marian42/mesh_to_sdf

pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"

Opened this issue · 1 comments

I add "import os, os.environ['PYOPENGL_PLATFORM'] = 'egl'", but it still cannot work!

Traceback (most recent call last):
File "/home/lyq/mesh_to_sdf-master/train.py", line 19, in
viewer = pyrender.Viewer(scene, use_raymond_lighting=True, point_size=2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyrender/viewer.py", line 349, in init
self._init_and_start_app()
File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyrender/viewer.py", line 1016, in _init_and_start_app
super(Viewer, self).init(config=conf, resizable=True,
File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/window/xlib/init.py", line 133, in init
super(XlibWindow, self).init(*args, **kwargs)
File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/window/init.py", line 513, in init
display = pyglet.canvas.get_display()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/canvas/init.py", line 59, in get_display
return Display()
^^^^^^^^^
File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/canvas/xlib.py", line 88, in init
raise NoSuchDisplayException(f'Cannot connect to "{name}"')
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"

I add "import os, os.environ['PYOPENGL_PLATFORM'] = 'egl'", but it still cannot work!

Traceback (most recent call last): File "/home/lyq/mesh_to_sdf-master/train.py", line 19, in viewer = pyrender.Viewer(scene, use_raymond_lighting=True, point_size=2) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyrender/viewer.py", line 349, in init self._init_and_start_app() File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyrender/viewer.py", line 1016, in _init_and_start_app super(Viewer, self).init(config=conf, resizable=True, File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/window/xlib/init.py", line 133, in init super(XlibWindow, self).init(*args, **kwargs) File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/window/init.py", line 513, in init display = pyglet.canvas.get_display() ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/canvas/init.py", line 59, in get_display return Display() ^^^^^^^^^ File "/home/lyq/anaconda3/envs/3Dmesh/lib/python3.11/site-packages/pyglet/canvas/xlib.py", line 88, in init raise NoSuchDisplayException(f'Cannot connect to "{name}"') pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"

I have the same problem. Did you solve the problem?