Skip to content

Python error AssertionError: Observation space ... does not inherit from gym.spaces.Space #43

Description

@nickponline
(dev) [nickp@m1 baba-babaisyou-v0 (main)]$ python3 DQN.py 
Traceback (most recent call last):
  File "DQN.py", line 16, in <module>
    env = gym.make('baba-babaisyou-v0')
  File "/Users/nickp/opt/anaconda3/envs/dev/lib/python3.7/site-packages/gym/envs/registration.py", line 601, in make
    env = PassiveEnvChecker(env)
  File "/Users/nickp/opt/anaconda3/envs/dev/lib/python3.7/site-packages/gym/wrappers/env_checker.py", line 25, in __init__
    check_observation_space(env.action_space)
  File "/Users/nickp/opt/anaconda3/envs/dev/lib/python3.7/site-packages/gym/utils/passive_env_checker.py", line 145, in check_observation_space
    f"Observation space ({observation_space}) does not inherit from gym.spaces.Space"
AssertionError: Observation space ([<Direction.UP: 1>, <Direction.DOWN: 2>, <Direction.LEFT: 3>, <Direction.RIGHT: 4>]) does not inherit from gym.spaces.Space
Python 3.7.10
gym.__version__ = '0.24.1'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions