J
Jim
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\Lib\site-packages\pythonwin\pywin\framework
\scriptutils.py",
line 310, in RunScript
exec codeObject in __main__.__dict__
File "C:Lookup.py", line 103, in <module>
contents = urllib2.urlopen(url).read()
File "C:\Python25\lib\urllib2.py", line 121, in urlopen
return _opener.open(url, data)
File "C:\Python25\lib\urllib2.py", line 374, in open
response = self._open(req, data)
File "C:\Python25\lib\urllib2.py", line 392, in _open
'_open', req)
File "C:\Python25\lib\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\lib\urllib2.py", line 1100, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "C:\Python25\lib\urllib2.py", line 1073, in do_open
r = h.getresponse()
File "C:\Python25\lib\httplib.py", line 924, in getresponse
response.begin()
File "C:\Python25\lib\httplib.py", line 385, in begin
version, status, reason = self._read_status()
File "C:\Python25\lib\httplib.py", line 349, in _read_status
raise BadStatusLine(line)
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\Lib\site-packages\pythonwin\pywin\framework
\scriptutils.py",
line 310, in RunScript
exec codeObject in __main__.__dict__
File "C:Lookup.py", line 103, in <module>
contents = urllib2.urlopen(url).read()
File "C:\Python25\lib\urllib2.py", line 121, in urlopen
return _opener.open(url, data)
File "C:\Python25\lib\urllib2.py", line 374, in open
response = self._open(req, data)
File "C:\Python25\lib\urllib2.py", line 392, in _open
'_open', req)
File "C:\Python25\lib\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\lib\urllib2.py", line 1100, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "C:\Python25\lib\urllib2.py", line 1073, in do_open
r = h.getresponse()
File "C:\Python25\lib\httplib.py", line 924, in getresponse
response.begin()
File "C:\Python25\lib\httplib.py", line 385, in begin
version, status, reason = self._read_status()
File "C:\Python25\lib\httplib.py", line 349, in _read_status
raise BadStatusLine(line)
BadStatusLine