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

AttributeError: 'generator' object has no attribute 'next' #15

Open
MohammadYousufHussain opened this issue Jan 29, 2018 · 2 comments
Open

Comments

@MohammadYousufHussain
Copy link

DQN example as well as random data generator example are giving this error.

69 """
70 try:
---> 71 return self.generator.next()
72 except StopIteration as e:
73 self._iterator_end()

AttributeError: 'generator' object has no attribute 'next'

@osghaffar
Copy link

Have been getting this error as well, it stems from the Python 2.x/Python 3.x incompatibility. They need to fully update it to support Python 3.x. In the meantime, view the Pull Requests and see if one of the files someone uploaded there work.

@alain-sam
Copy link

alain-sam commented Apr 26, 2018

generator.next() is not available in 3.x, you must either use self.generator.__next()__ (not recommended), or next(self.generator) (recommended). See here for more info.

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

3 participants