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

manual_control.py is broken #188

Closed fedetask closed 2 years ago

fedetask commented 2 years ago

I'm opening this issue to notify that the manual_control.py script is currently broken.

Simply running python manual_control.py yields:

Traceback (most recent call last):
  File "/home/fedetask/Desktop/thesis/gym-minigrid/manual_control.py", line 111, in <module>
    reset()
  File "/home/fedetask/Desktop/thesis/gym-minigrid/manual_control.py", line 21, in reset
    obs = env.reset()
  File "/home/fedetask/Desktop/thesis/venv/lib/python3.9/site-packages/gym/wrappers/order_enforcing.py", line 42, in reset
    return self.env.reset(**kwargs)
  File "/home/fedetask/Desktop/thesis/venv/lib/python3.9/site-packages/gym/wrappers/env_checker.py", line 47, in reset
    return passive_env_reset_check(self.env, **kwargs)
  File "/home/fedetask/Desktop/thesis/venv/lib/python3.9/site-packages/gym/utils/passive_env_checker.py", line 247, in passive_env_reset_check
    _check_obs(obs, env.observation_space, "reset")
  File "/home/fedetask/Desktop/thesis/venv/lib/python3.9/site-packages/gym/utils/passive_env_checker.py", line 113, in _check_obs
    assert observation_space.contains(
AssertionError: The observation returned by the `reset()` method is not contained with the observation space (Dict(image: Box(0, 255, (7, 7, 3), uint8)))

I haven't had time to investigate the issue yet.

My configuration:

python==3.9.9 numpy==1.22.4 gym==0.24.1 matplotlib==3.5.2

lyjie1106 commented 2 years ago

i find same problem, i dont know what cause this issue, but downgrade the gym to 0.21.0 can solve this.

Oneiropolo commented 2 years ago

I've had same problem. solved by downgrade the gym to 0.21.0 as lyjie1006 said above.

pseudo-rnd-thoughts commented 2 years ago

Fixed by https://github.com/Farama-Foundation/gym-minigrid/pull/210