BadStatusLine error

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top