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

'MjModel' object has no attribute 'eq_active' error caused by mujuco version #47

Open
outsider76 opened this issue Dec 28, 2023 · 1 comment

Comments

@outsider76
Copy link

Running the example code after installing the dependencies may raise the corresponding error as follows:

Traceback (most recent call last):
  File "/home/pc/PlanInDream/dreamerv3-torch/dreamer.py", line 392, in <module>
    main(parser.parse_args(remaining))
  File "/home/pc/PlanInDream/dreamerv3-torch/dreamer.py", line 266, in main
    train_envs = [make("train") for _ in range(config.envs)]
  File "/home/pc/PlanInDream/dreamerv3-torch/dreamer.py", line 266, in <listcomp>
    train_envs = [make("train") for _ in range(config.envs)]
  File "/home/pc/PlanInDream/dreamerv3-torch/dreamer.py", line 265, in <lambda>
    make = lambda mode: make_env(config, mode)
  File "/home/pc/PlanInDream/dreamerv3-torch/dreamer.py", line 179, in make_env
    env = dmc.DeepMindControl(
  File "/home/pc/PlanInDream/dreamerv3-torch/envs/dmc.py", line 15, in __init__
    self._env = suite.load(
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/suite/__init__.py", line 113, in load
    return build_environment(domain_name, task_name, task_kwargs,
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/suite/__init__.py", line 148, in build_environment
    env = domain.SUITE[task_name](**task_kwargs)
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/suite/walker.py", line 62, in walk
    physics = Physics.from_xml_string(*get_model_and_assets())
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/mujoco/engine.py", line 436, in from_xml_string
    return cls.from_model(model)
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/mujoco/engine.py", line 419, in from_model
    return cls(data)
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/mujoco/engine.py", line 123, in __init__
    self._reload_from_data(data)
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/mujoco/engine.py", line 400, in _reload_from_data
    model=index.struct_indexer(self.model, 'mjmodel', axis_indexers),
  File "/home/pc/anaconda3/envs/PID/lib/python3.9/site-packages/dm_control/mujoco/index.py", line 628, in struct_indexer
    attr = getattr(struct, field_name)
AttributeError: 'MjModel' object has no attribute 'eq_active'

It is an error raised by mujoco version, which could be solved by degrading the version of the mujoco (like 2.3.4)

@NM512
Copy link
Owner

NM512 commented Jan 8, 2024

Hello,

Thank you for reaching out and sharing the issue you're encountering with Docker while trying to run DreamerV3. The problem you're experiencing is indeed related to the recent major update of Mujoco to versions beyond 3.0.0.

To resolve this, I have updated our project to fix the Mujoco version. This fix is included in the latest commit.

If you continue to face any challenges or have further questions, please don't hesitate to reach out again.

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

2 participants