Strange's exception :-)

bart e_viola at libero.it
Mon Nov 25 10:43:15 EST 2002


When I run urlopen function to connect, sometimes, happen that its 
performance is stopped in this way:

Traceback (most recent call last):
   File "newspider.py", line 78, in ?
   File "MyParser.py", line 201, in connect
   File "MyParser.py", line 28, in urlopen
   File "/usr/local/lib/python2.2/urllib2.py", line 322, in open
     '_open', req)
   File "/usr/local/lib/python2.2/urllib2.py", line 301, in _call_chain
     result = func(*args)
   File "/usr/local/lib/python2.2/urllib2.py", line 790, in http_open
     return self.do_open(httplib.HTTP, req)
   File "/usr/local/lib/python2.2/urllib2.py", line 779, in do_open
     code, msg, hdrs = h.getreply()
   File "/usr/local/lib/python2.2/httplib.py", line 1009, in getreply
     response = self._conn.getresponse()
   File "/usr/local/lib/python2.2/httplib.py", line 760, in getresponse
     response.begin()
   File "/usr/local/lib/python2.2/httplib.py", line 269, in begin
     version, status, reason = self._read_status()
   File "/usr/local/lib/python2.2/httplib.py", line 231, in _read_status
     line = self.fp.readline()
IOError: [Errno 104] Connection reset by peer

What can I do to manage this exception?

Thanks...

																       - Ennio -




More information about the Python-list mailing list