BadStatusLine error
Issue #3
resolved
Pynav.go method sometimes crash with a BadStatusLine error:
{{{ #!python
File "/usr/lib/python2.6/httplib.py", line 355, in _read_status raise BadStatusLine(line) BadStatusLine }}}
Full Traceback : http://python.pastebin.com/f598f4501
Comments (4)
-
reporter -
reporter - edited description
-
reporter -
reporter - changed status to resolved
Small fix in revision 23 : http://bitbucket.org/sloft/pynav/changeset/96c7346d9e31/ Target version: 0.7
- Log in to comment
It is a httplib Python error wich appears to be raised when :
- the status line is empty
- the 'strict' flag is on and the status line didn't start with 'HTTP/'
- the 'status' part of the status line is not convertible to an int
- the status code ('status' part of the status line, converted to an int) is lower than 100 or higher than 999
Source : http://bytes.com/topic/python/answers/839939-badstatusline
An other link on the subject : http://mail.python.org/pipermail/python-bugs-list/2002-July/012498.html
It could be catch by adding :
After
The error is properly catch but the error output is empt and the page returned by go() is empty. Firefox can read the page but not Pynav, the problem is not solved yet.