Farama-Foundation / Minigrid

Simple and easily configurable grid world environments for reinforcement learning
https://minigrid.farama.org/
Other
2.09k stars 604 forks source link

Can't run manual_control.py => KeyError: 'render_modes' #196

Closed LaironSk closed 2 years ago

LaironSk commented 2 years ago

C:\Users\matsa\gym-minigrid>python manual_control.py Traceback (most recent call last): File "C:\Users\matsa\gym-minigrid\manual_control.py", line 102, in env = gym.make(args.env) File "C:\Users\matsa\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\gym\envs\registration.py", line 625, in make render_modes = env_creator.metadata["render_modes"] KeyError: 'render_modes'

anyboby commented 2 years ago

This should be due to a version mismatch, downgrading to gym 0.21.0 should solve the issue:

pip uninstall gym

pip install gym==0.21.0

see also this PR: https://github.com/openai/gym/pull/2990

pseudo-rnd-thoughts commented 2 years ago

@anyboby Thanks, yes you are correct, gym-minigrid currently doesn't support the latest gym version. That is in the works. Gym v0.23.0 should work fine, let us know if that is not correct