You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import safety_gymnasium
env_id = 'SafetyPointGoal1-v0'
render_mode = "human" if True else None
env = safety_gymnasium.make(env_id,
render_mode=render_mode)
obs, info = env.reset()
while True:
act = env.action_space.sample()
obs, reward, cost, terminated, truncated, info = env.step(act)
if terminated or truncated:
break
env.render()
The error is
warning: queue 0x2123a10 destroyed while proxies still attached:
wl_registry#21 still attached
WARNING: OpenGL error 0x502 in or before mjr_makeContext
[destroyed object]: error 7: failed to import supplied dmabufs: Arguments are inconsistent (for example, a valid context requires buffers not supplied by a
warning: queue 0x23aa930 destroyed while proxies still attached:
wl_callback#43 still attached
warning: queue 0x2123d30 destroyed while proxies still attached:
zwp_linux_dmabuf_v1#23 still attached
/home/xx/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:914: GLFWError: (65537) b'The GLFW library is not initialized'
warnings.warn(message, GLFWError)
Exception ignored in: <function WindowViewer.__del__ at 0x780a67fbe940>
Traceback (most recent call last):
File "/home/xx/anaconda3/envs/safe/lib/python3.8/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 335, in __del__
File "/home/xx/anaconda3/envs/safe/lib/python3.8/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 328, in free
AttributeError: 'NoneType' object has no attribute 'get_current_context'
The text was updated successfully, but these errors were encountered:
Sorry for the late response. It seems I missed this issue. It looks like you encountered this error when exiting the render process? This issue is inherited from Gymnasium, and I’ve had discussions with its developers about it. Unfortunately, resolving this problem is quite challenging, but it shouldn’t affect normal usage. If you need further assistance, feel free to reach out to me.
Sorry for the late response. It seems I missed this issue. It looks like you encountered this error when exiting the render process? This issue is inherited from Gymnasium, and I’ve had discussions with its developers about it. Unfortunately, resolving this problem is quite challenging, but it shouldn’t affect normal usage. If you need further assistance, feel free to reach out to me.
If this problem cannot be solved, is the example provided on the homepage also wrong?
It is important to note that this issue primarily affects the process of destruction and does not impact the normal functioning of the code.
The issue with this example is that it does not specify render_mode within the make function. It should be: env = safety_gymnasium.make(env_id, render_mode='rgb_array')
The render_mode can be set to 'human', 'rgb_array', or 'depth_array'.
Required prerequisites
Questions
My code is
The error is
The text was updated successfully, but these errors were encountered: