marian42 / mesh_to_sdf

Calculate signed distance fields for arbitrary meshes
https://pypi.org/project/mesh-to-sdf/
MIT License
991 stars 107 forks source link

ValueError: Failed to initialize Pyglet window with an OpenGL >= 3+ context. #15

Open asurada404 opened 4 years ago

asurada404 commented 4 years ago

I tried to run the sample points demo.

points, sdf = sample_sdf_near_surface(mesh, number_of_points=250000)

I got some errors:

...
~/anaconda3/lib/python3.6/site-packages/pyrender/platforms/pyglet_platform.py in init_context(self)
     36                 'context. If you\'re logged in via SSH, ensure that you\'re '
     37                 'running your script with vglrun (i.e. VirtualGL). The '
---> 38                 'internal error message was "{}"'.format(e)
     39             )
     40 

ValueError: Failed to initialize Pyglet window with an OpenGL >= 3+ context. If you're logged in via SSH, ensure that you're running your script with vglrun (i.e. VirtualGL). The internal error message was "'NoneType' object has no attribute 'setView_'"

Can anyone give me some help?

lincolt commented 4 years ago

Same issue here. It occurs when using surface_point_method='scan' method. 'Sample' works fine.

pculbertson commented 3 years ago

I get this error when running on an Ubuntu machine without a server -- error is resolved if you run import os; os.environ['PYOPENGL_PLATFORM'] = 'egl' as described in the README.

GTO2013 commented 3 years ago

This also randomly happens on Windows for me