Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error! TimeLimit' object has no attribute 'ale' #29

Open
tangyudi opened this issue Mar 16, 2017 · 7 comments
Open

Error! TimeLimit' object has no attribute 'ale' #29

tangyudi opened this issue Mar 16, 2017 · 7 comments

Comments

@tangyudi
Copy link

I run this code in cpu and this error occurred.

TimeLimit' object has no attribute 'ale' Can anyone show me how to solve this matter?
Thank you !

@Lan1991Xu
Copy link

Hi, you can just pip install gym==0.7.0 solve this problem. This is because new gym 0.8.0 released and it is hard to use for this code.

@tangyudi
Copy link
Author

@Lan1991Xu Thanky you!
Can I test with this check point? When I use python main.py --is_train=False --display=True,it occur a load failed error.

@DanielTakeshi
Copy link

I'm also running into this problem. How would we use this for the latest version of gym?

@cteckwee
Copy link

cteckwee commented Apr 7, 2017

Try to unwrap the env
env = env.unwrapped

@scratch314
Copy link

Only Breakout can be applied.
Try the following code.

def init(self, config):
self.step_info = None

def _step(self, action):
self._screen, self.reward, self.terminal, self.step_info = self.env.step(action)

def lives(self):
if self.step_info is None:
return 0
else:
return self.step_info['ale.lives']

@fanyuzeng
Copy link

fanyuzeng commented Feb 27, 2018

How to solve this problem? I try pip install gym==0.7.0, but it failed. In addition, I try the following code in main.py , it also failed.

def init(self, config):
self.step_info = None

def _step(self, action):
self._screen, self.reward, self.terminal, self.step_info = self.env.step(action)

def lives(self):
if self.step_info is None:
return 0
else:
return self.step_info['ale.lives']

@mumbho
Copy link

mumbho commented Mar 1, 2018

I have the same issue; tried to revert gym to 0.7.4 and 0.7.3 (from repo) but then atari games will render as text. I've tried with other gym versions as well. I can only render atari envs using the latest version, but then dqn breaks. Any solution is greatly appreciated.
When using latest gym version, tried to unwrap env as suggested, got into another issue:
in /home/me/work/bitbucket/NeuralNetworks/My/dependencies/gym/gym/wrappers/time_limit.py
error: Cannot call env.step() before calling reset()

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

No branches or pull requests

7 participants