NM512 / dreamerv3-torch

Implementation of Dreamer v3 in pytorch.
MIT License
422 stars 96 forks source link

Error with Test Script #48

Closed reddyn12 closed 1 month ago

reddyn12 commented 10 months ago

[nr620@gpu022 dreamerv3-torch]$ python3 dreamer.py --configs dmc_vision --task dmc_walker_walk --logdir ./logdir/dmc_walker_walk Logdir logdir/dmc_walker_walk Create envs. Traceback (most recent call last): File "/cache/home/nr620/code/dreamerv3-torch/dreamer.py", line 365, in main(parser.parse_args(remaining)) File "/cache/home/nr620/code/dreamerv3-torch/dreamer.py", line 238, in main train_envs = [make("train", i) for i in range(config.envs)] File "/cache/home/nr620/code/dreamerv3-torch/dreamer.py", line 238, in train_envs = [make("train", i) for i in range(config.envs)] File "/cache/home/nr620/code/dreamerv3-torch/dreamer.py", line 237, in make = lambda mode, id: make_env(config, mode, id) File "/cache/home/nr620/code/dreamerv3-torch/dreamer.py", line 151, in make_env env = dmc.DeepMindControl( File "/cache/home/nr620/code/dreamerv3-torch/envs/dmc.py", line 13, in init from dm_control import suite File "/home/nr620/.local/lib/python3.9/site-packages/dm_control/suite/init.py", line 24, in from dm_control.suite import acrobot File "/home/nr620/.local/lib/python3.9/site-packages/dm_control/suite/acrobot.py", line 20, in from dm_control import mujoco File "/home/nr620/.local/lib/python3.9/site-packages/dm_control/mujoco/init.py", line 18, in from dm_control.mujoco.engine import action_spec File "/home/nr620/.local/lib/python3.9/site-packages/dm_control/mujoco/engine.py", line 41, in from dm_control import _render File "/home/nr620/.local/lib/python3.9/site-packages/dm_control/_render/init.py", line 86, in Renderer = import_func() File "/home/nr620/.local/lib/python3.9/site-packages/dm_control/_render/init.py", line 46, in _import_osmesa from dm_control._render.pyopengl.osmesa_renderer import OSMesaContext File "/home/nr620/.local/lib/python3.9/site-packages/dm_control/_render/pyopengl/osmesa_renderer.py", line 35, in from OpenGL import GL File "/home/nr620/.local/lib/python3.9/site-packages/OpenGL/GL/init.py", line 4, in from OpenGL.GL.VERSION.GL_1_1 import File "/home/nr620/.local/lib/python3.9/site-packages/OpenGL/GL/VERSION/GL_1_1.py", line 14, in from OpenGL.raw.GL.VERSION.GL_1_1 import File "/home/nr620/.local/lib/python3.9/site-packages/OpenGL/raw/GL/VERSION/GL_1_1.py", line 7, in from OpenGL.raw.GL import _errors File "/home/nr620/.local/lib/python3.9/site-packages/OpenGL/raw/GL/_errors.py", line 4, in _error_checker = _ErrorChecker( _p, _p.GL.glGetError ) AttributeError: 'NoneType' object has no attribute 'glGetError'

reddyn12 commented 10 months ago

Btw, I had to comment out the gym import cuase there was a problem with that too.

NM512 commented 10 months ago

Hello,

Thank you for bringing this issue to my attention. Based on the traceback, it appears that the error is related to the Mujoco installation and its interaction with OpenGL. Could you try the following installation?

pip install PyOpenGL

Or I recommend checking your Mujoco and relavant packages installation. Make sure you have the required dependencies and the correct version installed. You can refer the documentation of the Mujoco and relavant packages installation for more details: Mujoco Installation

Feel free to reach out if you need further assistance or if the problem persists.