Hi
I get a BadStatusLine error (indicated below). Can anyone help with
how to
catch error in code before abort?
Thanks
Jim
Traceback (most recent call last):
File
"C:\Python25\Li b\site-packages\python win\pywin\frame work
\scriptutils.py ",
line 310, in RunScript
exec codeObject in __main__.__dict __
File "C:Lookup.p y", line 103, in <module>
contents = urllib2.urlopen (url).read()
File "C:\Python25\li b\urllib2.py", line 121, in urlopen
return _opener.open(ur l, data)
File "C:\Python25\li b\urllib2.py", line 374, in open
response = self._open(req, data)
File "C:\Python25\li b\urllib2.py", line 392, in _open
'_open', req)
File "C:\Python25\li b\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\li b\urllib2.py", line 1100, in http_open
return self.do_open(ht tplib.HTTPConne ction, req)
File "C:\Python25\li b\urllib2.py", line 1073, in do_open
r = h.getresponse()
File "C:\Python25\li b\httplib.py", line 924, in getresponse
response.begin( )
File "C:\Python25\li b\httplib.py", line 385, in begin
version, status, reason = self._read_stat us()
File "C:\Python25\li b\httplib.py", line 349, in _read_status
raise BadStatusLine(l ine)
BadStatusLine
I get a BadStatusLine error (indicated below). Can anyone help with
how to
catch error in code before abort?
Thanks
Jim
Traceback (most recent call last):
File
"C:\Python25\Li b\site-packages\python win\pywin\frame work
\scriptutils.py ",
line 310, in RunScript
exec codeObject in __main__.__dict __
File "C:Lookup.p y", line 103, in <module>
contents = urllib2.urlopen (url).read()
File "C:\Python25\li b\urllib2.py", line 121, in urlopen
return _opener.open(ur l, data)
File "C:\Python25\li b\urllib2.py", line 374, in open
response = self._open(req, data)
File "C:\Python25\li b\urllib2.py", line 392, in _open
'_open', req)
File "C:\Python25\li b\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\li b\urllib2.py", line 1100, in http_open
return self.do_open(ht tplib.HTTPConne ction, req)
File "C:\Python25\li b\urllib2.py", line 1073, in do_open
r = h.getresponse()
File "C:\Python25\li b\httplib.py", line 924, in getresponse
response.begin( )
File "C:\Python25\li b\httplib.py", line 385, in begin
version, status, reason = self._read_stat us()
File "C:\Python25\li b\httplib.py", line 349, in _read_status
raise BadStatusLine(l ine)
BadStatusLine
Comment