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: 'listiterator' object has no attribute 'next' #1408

Closed
bb-migration opened this Issue Mar 14, 2016 · 2 comments

Comments

3 participants
@bb-migration

bb-migration commented Mar 14, 2016

Originally reported by: Anonymous


While stopping service cherrypy logged error:

ERR 2016-03-12 20:48:32,460 cherrypy.error.140129365106640 11286 'CP Server Thread-7' : [12/Mar/2016:20:48:32]  Traceback (most recent call last):
  File "site-packages/cherrypy/_cpwsgi.py", line 180, in trap
  File "site-packages/cherrypy/_cpwsgi.py", line 277, in next
AttributeError: 'listiterator' object has no attribute 'next'
 [_cplogging.py:216]

@jaraco

This comment has been minimized.

Show comment
Hide comment
@jaraco

jaraco May 1, 2016

Member

I'm surprised that this would happen - it seems by my reading of the code that attribute .next is only accessed on Python 2, and even on Python 2.7.10, a listiterator does have the next attribute. Still, now that Python 2.6 is required, this issue should be straightforward to fix.

Member

jaraco commented May 1, 2016

I'm surprised that this would happen - it seems by my reading of the code that attribute .next is only accessed on Python 2, and even on Python 2.7.10, a listiterator does have the next attribute. Still, now that Python 2.6 is required, this issue should be straightforward to fix.

@jaraco jaraco closed this in 0202bb1 May 1, 2016

@capitalterefe

This comment has been minimized.

Show comment
Hide comment
@capitalterefe

capitalterefe Dec 31, 2017

use __next__() instead if you are on Python 3

capitalterefe commented Dec 31, 2017

use __next__() instead if you are on Python 3

@cherrypy cherrypy locked as resolved and limited conversation to collaborators Dec 31, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.