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

[Bug Report] Hopper "global" XML error #597

Closed
1 task done
rickstaa opened this issue Jul 10, 2023 · 5 comments
Closed
1 task done

[Bug Report] Hopper "global" XML error #597

rickstaa opened this issue Jul 10, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@rickstaa
Copy link

rickstaa commented Jul 10, 2023

Describe the bug

When trying to run the Hopper-v4 environment, I receive the following error:

ValueError: XML Error: global coordinates no longer supported. To convert existing models, load and save them in MuJoCo 2.3.3 or older
Element 'compiler', line 2

As explained in google-deepmind/mujoco#833, this is caused by an upstream change in the Mujoco library. For now, the best way to solve this is to pin Mujoco to version 2.3.3. I, however, wanted to open this issue to track the release of #589. Feel free to close this issue if you think this is unnecessary.

Code example

  1. Install Mujoco v0.28.0.
  2. Try to run the following code:
import gymnasium as gym

if __name__ == "__main__":
    env = gym.make('Hopper-v4', render_mode='human')

    env.reset()
    print("Testing Hopper-v4 environment.")
    for _ in range(1000):
        env.render()
        env.step(env.action_space.sample())

    env.close()
    print("Test finished.")
  1. Be greeted by the error.

System info

Gymnasium install type: pip
Pip version: 23.1.2
Gymnasium version: 0.28.1
Mujoco version: 2.3.6
OS: Ubuntu 20.04
Python: 3.8.10

Additional context

Will be solved when #589 is released.

Checklist

  • I have checked that there is no similar issue in the repo
@rickstaa rickstaa added the bug Something isn't working label Jul 10, 2023
@rickstaa
Copy link
Author

rickstaa commented Jul 10, 2023

Related to #572.

@pseudo-rnd-thoughts
Copy link
Member

This has already been fixed in #589
We will hopefully have a release soon for everyone to use

@rickstaa
Copy link
Author

For future reference. This was released under https://github.com/Farama-Foundation/Gymnasium/releases/tag/v0.29.0.

@Longyouyuan
Copy link

This has already been fixed in #589 We will hopefully have a release soon for everyone to use

but how to use the file to fix the problem?

@pseudo-rnd-thoughts
Copy link
Member

This has already been fixed in #589 We will hopefully have a release soon for everyone to use

but how to use the file to fix the problem?

You should just need to use gymnasium v0.29.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants