Skip to content

[Question] render error #123

@mumuyanyan

Description

@mumuyanyan

Required prerequisites

Questions

My code is


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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions