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

AttributeError: 'NoneType' object has no attribute 'glGetError' #65

Open
xkq1qkx opened this issue Oct 6, 2024 · 4 comments
Open

AttributeError: 'NoneType' object has no attribute 'glGetError' #65

xkq1qkx opened this issue Oct 6, 2024 · 4 comments

Comments

@xkq1qkx
Copy link

xkq1qkx commented Oct 6, 2024

(dreamerv3) xkq@xkq-Legion:~/Documents/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 "/home/xkq/Documents/dreamerv3_torch/dreamer.py", line 365, in
main(parser.parse_args(remaining))
File "/home/xkq/Documents/dreamerv3_torch/dreamer.py", line 238, in main
train_envs = [make("train", i) for i in range(config.envs)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xkq/Documents/dreamerv3_torch/dreamer.py", line 238, in
train_envs = [make("train", i) for i in range(config.envs)]
^^^^^^^^^^^^^^^^
File "/home/xkq/Documents/dreamerv3_torch/dreamer.py", line 237, in
make = lambda mode, id: make_env(config, mode, id)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xkq/Documents/dreamerv3_torch/dreamer.py", line 151, in make_env
env = dmc.DeepMindControl(
^^^^^^^^^^^^^^^^^^^^
File "/home/xkq/Documents/dreamerv3_torch/envs/dmc.py", line 13, in init
from dm_control import suite
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/dm_control/suite/init.py", line 24, in
from dm_control.suite import acrobot
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/dm_control/suite/acrobot.py", line 20, in
from dm_control import mujoco
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/dm_control/mujoco/init.py", line 18, in
from dm_control.mujoco.engine import action_spec
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/dm_control/mujoco/engine.py", line 41, in
from dm_control import _render
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/dm_control/_render/init.py", line 86, in
Renderer = import_func()
^^^^^^^^^^^^^
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/dm_control/_render/init.py", line 46, in _import_osmesa
from dm_control._render.pyopengl.osmesa_renderer import OSMesaContext
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/dm_control/_render/pyopengl/osmesa_renderer.py", line 35, in
from OpenGL import GL
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/OpenGL/GL/init.py", line 4, in
from OpenGL.GL.VERSION.GL_1_1 import *
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/OpenGL/GL/VERSION/GL_1_1.py", line 14, in
from OpenGL.raw.GL.VERSION.GL_1_1 import *
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/OpenGL/raw/GL/VERSION/GL_1_1.py", line 7, in
from OpenGL.raw.GL import _errors
File "/home/xkq/miniconda3/envs/dreamerv3/lib/python3.11/site-packages/OpenGL/raw/GL/_errors.py", line 4, in
_error_checker = _ErrorChecker( _p, _p.GL.glGetError )
^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'glGetError'

@JesusmiCaH
Copy link

Same problem bro, have you found any solutions?

@xkq1qkx
Copy link
Author

xkq1qkx commented Oct 18, 2024 via email

@yongzhengqi
Copy link

Solved by running conda install -c conda-forge mesalib

See more at: conda-forge/mujoco-feedstock#48

@danielefoffano
Copy link

danielefoffano commented Dec 2, 2024

Had the same problem using Ubuntu 24.04 and venv, solved with

sudo apt-get update && sudo apt-get install ffmpeg libsm6 libxext6 -y
sudo apt-get install -y libgl1-mesa-dev libosmesa6-dev

As suggested here.

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

4 participants