Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

AssertionError: Observation space (None) does not inherit from gym.spaces.Space #5

Open
yixiaoer opened this issue Aug 17, 2022 · 0 comments

Comments

@yixiaoer
Copy link

run python -u train_agent.py --agent_type simple --game_dir ./games/twc --game_name *.ulx --difficulty_level easy as instruction, but there is error:
"The registry.env_specs property along with EnvSpecTree is deprecated. Please use registry directly as a dictionary instead."
Traceback (most recent call last):
File "train_agent.py", line 300, in
scores, norm_scores, moves = play(myagent, opt, random_action=random_action)
File "train_agent.py", line 38, in play
opt.mode, opt.verbose)
File "/code/commonsense-rl/games/dataset.py", line 19, in get_game_env
env = gym.make(env_id)
File "/root/miniconda3/envs/twc/lib/python3.7/site-packages/gym/envs/registration.py", line 601, in make
env = PassiveEnvChecker(env)
File "/root/miniconda3/envs/twc/lib/python3.7/site-packages/gym/wrappers/env_checker.py", line 25, in init
check_observation_space(env.action_space)
File "/root/miniconda3/envs/twc/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 (None) does not inherit from gym.spaces.Space
屏幕快照 2022-08-17 上午8 32 56

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant