Error when rendering as a 3D human ("slow" visualisation) in Gradio demo
Hi, so I am running the gradio demo using python app.py , it works fine with the "fast" visualisation mode (i.e. skeletal keypoints). But whenever I am changing it to the "slow" visualisation mode to see the full human rendering, I am encountering this peculiar error (it's a long error msg but this is the last line -- if you need the full error message I can provide you that):
raise NoSuchDisplayException(f'Cannot connect to "{name}"')
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"
Not understanding what is happening. I searched stackoverflow, some posts said it was a vscode issue while opening a new window, but here all rendering is happening in the localhost server, so what's the problem here?
If anyone has faced this issue and knows a workaround, please let me know. Thanks in advance!
@soumitri2001 I encountered the same error, but managed to resolve it using the following steps:
- Set the environment variables:
import os
os.environ['DISPLAY'] = ':0.0'
os.environ['PYOPENGL_PLATFORM'] = 'egl'
- Install triangle:
pip install triangle==20220202
- Add the following import to
app.py:
import imageio
I hope this helps!