reinforcement-learning
reinforcement-learning copied to clipboard
No attribute 'wrappers'
In Deep Q-Learning for Atari Games(Deep Q Learning solution.py), there is some issues about version.. I guess..
When I run it, the following came up....
Populating replay memory...
Error Traceback (most recent call last)
/home/wonchul/gym/gym/core.py in monitor(self)
90 @property
91 def monitor(self):
---> 92 raise error.Error("env.monitor has been deprecated as of 12/23/2016. Remove your call to env.monitor.start(directory)
and instead wrap your env with env = gym.wrappers.Monitor(env, directory)
to record data.")
93
94 def step(self, action):
Error: env.monitor has been deprecated as of 12/23/2016. Remove your call to env.monitor.start(directory)
and instead wrap your env with env = gym.wrappers.Monitor(env, directory)
to record data.
==> So, i've changed 'env.monitor.start(directory)' to 'env = gym.wrappers.Monitor(env, directory)'. However, in this time, the following came up...
Populating replay memory...
AttributeError Traceback (most recent call last)
AttributeError: 'module' object has no attribute 'wrappers'
==> so, I googled this error to solve it... but no one had answer,,, ( I found that some one solved this problem by upgrading gym,,, but I don't know how to upgrade... moreover I installed gym 5 days ago... kind of recent one...)
Could you help me out???
I met the same problem
Encountering the same issue... hopefully somebody with more knowledge of this than me can help.
Spoke to soon, I believe I've fixed it. Add the line:
from gym import wrappers
after
import gym
at the beginning of your atari_1step_qlearning.py
file.
If you are running this in python3, change xrange
to range
in the py file above.
That worked for me, let me know if that solves your issue.
It works for me. Thank you very much!
Thanks, it works for me.