BadStatusLine error

Issue #3 resolved
sloft repo owner created an issue

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)

  1. sloft reporter

    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 :

            except httplib.BadStatusLine, msg:
                print 'BadStatusLine Error !'
                print msg.line
    

    After

    try:
        handle = self.__url_opener.open(req)
    

    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.

  2. Log in to comment