simoninithomas/Deep_reinforcement_learning_Course

AttributeError: spec missing in TimeLimit wrapper

kmcnayr opened this issue · 1 comments

I receive this error when running the PPO play/agent:

/gym/wrappers/time_limit.py", line 10, in init
self.env.spec.max_episode_steps = max_episode_steps
AttributeError: 'NoneType' object has no attribute 'max_episode_steps'

I narrowed it down to the attribute 'spec' being None in the TimeLimit wrapper.

I can't find a package requirements list with versions for the course repo so I can't tell if this is caused by a recent version update or if it's something I'm doing wrong.

I cloned and installed the latest of all repos: gym, retro, retro-contest, and Deep_reinforcement_learning_Course

Is this an issue or am I being dense? Would greatly appreciate if anyone can shed some light on how to run the courses in this repo. I have not been successful so far.

This was fixed in a recent update in the gym repo to the TimeLimit wrapper in commit 144c851

Either install the latest from github or update the time_limit.py file manually in your install.