Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL.error.Error: Attempt to retrieve context when no valid context #609

Open
siddarth09 opened this issue Jan 18, 2025 · 0 comments
Open

Comments

@siddarth09
Copy link

`Exception in thread Thread-2 (_init_and_start_app):
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/siddarth/.local/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 1161, in _init_and_start_app
pyglet.clock.tick()
File "/home/siddarth/.local/lib/python3.10/site-packages/pyglet/clock.py", line 528, in tick
return _default.tick(poll)
File "/home/siddarth/.local/lib/python3.10/site-packages/pyglet/clock.py", line 270, in tick
self.call_scheduled_functions(delta_t)
File "/home/siddarth/.local/lib/python3.10/site-packages/pyglet/clock.py", line 217, in call_scheduled_functions
item.func(now - item.last_ts, *item.args, **item.kwargs)
File "/home/siddarth/.local/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 955, in _time_event
self.on_draw()
File "/home/siddarth/.local/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 654, in on_draw
self._render()
File "/home/siddarth/.local/lib/python3.10/site-packages/genesis/ext/pyrender/viewer.py", line 1098, in _render
retval = renderer.render(self.scene, flags, seg_node_map=seg_node_map)
File "/home/siddarth/.local/lib/python3.10/site-packages/genesis/ext/pyrender/renderer.py", line 141, in render
self._update_context(scene, flags)
File "/home/siddarth/.local/lib/python3.10/site-packages/genesis/ext/pyrender/renderer.py", line 899, in _update_context
p._add_to_context()
File "/home/siddarth/.local/lib/python3.10/site-packages/genesis/ext/pyrender/primitive.py", line 359, in _add_to_context
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, FLOAT_SZ * 3, ctypes.c_void_p(0))
File "src/latebind.pyx", line 51, in OpenGL_accelerate.latebind.Curry.call
File "/home/siddarth/.local/lib/python3.10/site-packages/OpenGL/GL/VERSION/GL_2_0.py", line 469, in glVertexAttribPointer
contextdata.setValue( key, array )
File "/home/siddarth/.local/lib/python3.10/site-packages/OpenGL/contextdata.py", line 58, in setValue
context = getContext( context )
File "/home/siddarth/.local/lib/python3.10/site-packages/OpenGL/contextdata.py", line 40, in getContext
raise error.Error(
OpenGL.error.Error: Attempt to retrieve context when no valid context

`

am running the hello genesis script given below

import genesis as gs
gs.init(backend=gs.cpu)

scene = gs.Scene(show_viewer=True)
plane = scene.add_entity(gs.morphs.Plane())
franka = scene.add_entity(
gs.morphs.MJCF(file='xml/franka_emika_panda/panda.xml'),
)

scene.build()

for i in range(1000):
scene.step()

All I get is a blank screen with the above error. Any help would be appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant