Connection reset by peer

守株待兔 1248283536 at
Tue Sep 13 22:39:36 EDT 2011

there is a multi-threads program  dowloading  data from yahoo,the main structure is as the following(omit something  unimportant )

class   webdata(object):
    def  __init__(self,name): = Queue.Queue()
        if  x  in  name:
    def  download(self):
            url = weburl
            hx = httplib2.Http()
            resp, content = hx.request(url, headers=headers)               
            print  url,"wrong"
    def  run(self):       
        for i in range(30):
if  __name__=="__main__": 

quote  is  a  list  which  i want to download,i was confused ,this program  can download something,
can't download something,
when i cancel  try,except , i get the output:
File "/usr/local/lib/python2.7/dist-packages/httplib2/", line 1436, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/local/lib/python2.7/dist-packages/httplib2/", line 1188, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/local/lib/python2.7/dist-packages/httplib2/", line 1171, in _conn_request
    content =
  File "/usr/lib/python2.7/", line 541, in read
    return self._read_chunked(amt)
  File "/usr/lib/python2.7/", line 590, in _read_chunked
  File "/usr/lib/python2.7/", line 647, in _safe_read
    chunk =, MAXAMOUNT))
  File "/usr/lib/python2.7/", line 380, in read
    data = self._sock.recv(left)
error: [Errno 104] Connection reset by peer

i  want to know,  my  computer(client)  reset  it  ,or  the yahoo (server)  reset it ,what is the peer??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list