You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The urllib2.urlopen() function may be throw the httplib.HTTPException (on python2.7) [1][2]. So i think that simplenote.py should handle the httplib.HTTPException.
[1] Full stack trace (Click to expand)
> /opt/nvpy/lib/python2.7/httplib.py(402)_read_status()
-> raise BadStatusLine("No status line received - the server has closed the connection")
(Pdb) bt
/home/yuuki/repo/github.com/cpbotha/nvpy/nvpy/debug.py(14)wrapper()
-> return fn(*args, **kwargs)
/home/yuuki/repo/github.com/cpbotha/nvpy/nvpy/notes_db.py(972)worker_sync()
-> result = self.update_note_to_server(o.note)
/home/yuuki/repo/github.com/cpbotha/nvpy/nvpy/notes_db.py(1012)update_note_to_server()
-> o, err = self.simplenote.update_note(note)
/home/yuuki/.local/lib/python2.7/site-packages/simplenote/simplenote.py(183)update_note()
-> response = urllib2.urlopen(request)
/opt/nvpy/lib/python2.7/urllib2.py(154)urlopen()
-> return opener.open(url, data, timeout)
/opt/nvpy/lib/python2.7/urllib2.py(429)open()
-> response = self._open(req, data)
/opt/nvpy/lib/python2.7/urllib2.py(447)_open()
-> '_open', req)
/opt/nvpy/lib/python2.7/urllib2.py(407)_call_chain()
-> result = func(*args)
/opt/nvpy/lib/python2.7/urllib2.py(1241)https_open()
-> context=self._context)
/opt/nvpy/lib/python2.7/urllib2.py(1201)do_open()
-> r = h.getresponse(buffering=True)
/opt/nvpy/lib/python2.7/httplib.py(1121)getresponse()
-> response.begin()
/opt/nvpy/lib/python2.7/httplib.py(438)begin()
-> version, status, reason = self._read_status()
> /opt/nvpy/lib/python2.7/httplib.py(402)_read_status()
-> raise BadStatusLine("No status line received - the server has closed the connection")
[2] Class hierarchy of the httplib.BadStatusLine (Click to expand)
-> o, err = self.simplenote.update_note(note)
/home/yuuki/.local/lib/python2.7/site-packages/simplenote/simplenote.py(183)update_note()
That line was meant to be handled by IOError, but that doesn't seem to be working in this situation. Might just need to add in another exception or handle the existing one differently.
So I can look to add that in, but seems like this is an actual bug/issue in urllib2. I.e. I would have thought HTTPError should catch it (or URLError as mentioned in the linked issue).
The
urllib2.urlopen()
function may be throw thehttplib.HTTPException
(on python2.7) [1][2]. So i think that simplenote.py should handle thehttplib.HTTPException
.[1] Full stack trace (Click to expand)
[2] Class hierarchy of the httplib.BadStatusLine (Click to expand)
The text was updated successfully, but these errors were encountered: