[RLlib] Issue 12831: AttributeError: 'NoneType' object has no attribute 'id' when using custom Atari env. (#12832)

This commit is contained in:
Sven Mika
2020-12-13 16:15:54 +01:00
committed by GitHub
parent 1e02b28abe
commit 3c808835a5
+1 -1
View File
@@ -278,7 +278,7 @@ def wrap_deepmind(env, dim=84, framestack=True):
"""
env = MonitorEnv(env)
env = NoopResetEnv(env, noop_max=30)
if "NoFrameskip" in env.spec.id:
if env.spec is not None and "NoFrameskip" in env.spec.id:
env = MaxAndSkipEnv(env, skip=4)
env = EpisodicLifeEnv(env)
if "FIRE" in env.unwrapped.get_action_meanings():