brain-slam / slam

Surface anaLysis And Modeling
MIT License
13 stars 24 forks source link

Bug: Error in example_surface_profiling due to pyglet #65

Closed alexpron closed 1 year ago

alexpron commented 3 years ago

When trying to launch example or building the documentation associated to examples using sphinx the following bug occurs:

WARNING: /home/alex/code/slam/examples/example_surface_profiling.py failed to execute correctly: Traceback (most recent call last):                                           
  File "/home/alex/code/slam/examples/example_surface_profiling.py", line 79, in <module>
    scene.show(smooth=False)
  File "/home/alex/softs/miniconda3/envs/slam/lib/python3.6/site-packages/trimesh/scene/scene.py", line 1049, in show
    return SceneViewer(self, **kwargs)
  File "/home/alex/softs/miniconda3/envs/slam/lib/python3.6/site-packages/trimesh/viewer/windowed.py", line 161, in __init__
    caption=caption)
  File "/home/alex/softs/miniconda3/envs/slam/lib/python3.6/site-packages/pyglet/window/__init__.py", line 588, in __init__
    screen = display.get_default_screen()
  File "/home/alex/softs/miniconda3/envs/slam/lib/python3.6/site-packages/pyglet/canvas/base.py", line 106, in get_default_screen
    return self.get_screens()[0]
  File "/home/alex/softs/miniconda3/envs/slam/lib/python3.6/site-packages/pyglet/canvas/base.py", line 98, in get_screens
    raise NotImplementedError('abstract')
NotImplementedError: abstract

This seems due to pyglet (call for an abstract method i.e. not properly implemented in the code) and apparently occurs from some versions of pyglet see (https://github.com/openai/gym/issues/775) .

A solution would be to remove pyglet and use exclusively visbrain for visualisation in examples

alexpron commented 1 year ago

Pyglet was removed and more generally visualization so closing this issue