>TypeError: argument of type 'NoneType' is not iterable
Hey Michael, thanks for the report. I have not seen this in any of the
logs for heimdal. So nice find ;) I don't see any reports in the
cherrypy mailing list either. Any idea what site you might have been
querying around that time? What version of cherrypy are you running?
From the error message it looks like python is complaining about being
asked to work with the 'path' variable when path is None. e.g. we may
want something like this: instead of
if NUMBER_SIGN in path:
we could have
if path and NUMBER_SIGN in path:
Farther down in that function there is a line that says
if QUESTION_MARK in path:
That will probaby fail in the same way.
Looking at cherrypy's code, it appears 'path' can certainly become
None from some calls to parse_request_uri() - there is a case where
the function returns (None, uri, None), which would set the path to
None and presumably trigger this bug. However, I was unable to trigger
that case with a few minutes of trying. I think we'd need someone who
knows more about cherrypy, what cherrypy 'authority' URLs are, and how
they work.
Are you interested in pinging the cherrypy list?
If you know what kind of URL your notary might have been fed that
would be very useful. From looking at parse_request_uri() it looks
like:
- it cannot be '*'
- it cannot have both '://' and a question mark
- it cannot start with '/'
Most notary URLs I've seen start with / or have a ?, so I would be
interested to see what happened here.
Summary: looks like a cherrypy bug. I'm not sure what the correct fix is.
Thanks for the report!