keiohta / tf2rl

TensorFlow2 Reinforcement Learning
MIT License
461 stars 104 forks source link

Fix atari-py related errors #137

Closed keiohta closed 3 years ago

keiohta commented 3 years ago

Recently I came to observe the following error, which I haven't several months ago.

$ python -u examples/run_sac_discrete.py --gpu -1 --logging-level WARNING --max-steps 256 --batch-size 32 --dir-suffix TEST --n-warmup 64 --memory-capacity 256
Traceback (most recent call last):
  File "examples/run_sac_discrete.py", line 23, in <module>
    env = gym.make(args.env_name)
  File "/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/site-packages/gym/envs/registration.py", line 145, in make
    return registry.make(id, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/site-packages/gym/envs/registration.py", line 90, in make
    env = spec.make(**kwargs)
  File "/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/site-packages/gym/envs/registration.py", line 60, in make
    env = cls(**_kwargs)
  File "/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/site-packages/gym/envs/atari/atari_env.py", line 49, in __init__
    self.game_path = atari_py.get_game_path(game)
  File "/opt/hostedtoolcache/Python/3.8.10/x64/lib/python3.8/site-packages/atari_py/games.py", line 20, in get_game_path
    raise Exception('ROM is missing for %s, see https://github.com/openai/atari-py#roms for instructions' % (game_name,))
Exception: ROM is missing for space_invaders, see https://github.com/openai/atari-py#roms for instructions

It seems this error occurs on some specific combinarion of platform and python version. For example, I observed on

keiohta commented 3 years ago

This PR resolved this issue.