Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #13258
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!goblin1!goblin.stu.neva.ru!news.astraweb.com!border5.a.newsrouter.astraweb.com!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <1248283536@qq.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'chunk': 0.07; 'method,': 0.07; 'something,': 0.07; 'authority,': 0.09; 'skip:" 60': 0.09; 'subject:peer': 0.09; 'subject:reset': 0.09; 'error:': 0.12; 'def': 0.15; '[errno': 0.16; 'except:': 0.16; 'resp,': 0.16; 'run(self):': 0.16; 'to:name:python-list': 0.18; 'structure': 0.23; 'skip:_ 20': 0.28; 'skip:" 30': 0.28; 'print': 0.29; 'confused': 0.30; 'peer': 0.30; 'class': 0.30; 'list': 0.32; "can't": 0.33; 'there': 0.33; 'to:addr:python-list': 0.33; 'body,': 0.34; 'try:': 0.34; 'connection': 0.36; 'file': 0.36; 'cancel': 0.37; 'something': 0.37; 'header:Mime-Version:1': 0.39; 'data': 0.39; 'to:addr:python.org': 0.39; 'reset': 0.40; 'download': 0.60; 'skip:v 40': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s0907; t=1315967978; bh=7b0bOgCqCCRmCxh6PCoHdIgdbFQR3nAcGN5D1C+550w=; h=X-QQ-SSF:X-QQ-BUSINESS-ORIGIN:X-Originating-IP:X-QQ-STYLE: X-QQ-mid:From:To:Subject:Mime-Version:Content-Type: Content-Transfer-Encoding:Date:X-Priority:Message-ID:X-QQ-MIME: X-Mailer:X-QQ-Mailer; b=BrCOmQdNc4zvNEgxqnJeiyrbdOA0bDe6YAX37DZn7vMa05v1q8Afxgk00pvL+5GTt 6YPpNL9AD6nl7mstsLMnKdDy8Mv9b6fC9Sd9tbiTn2IVkwlPjD2jgsqZ+WxYiOG |
| X-QQ-SSF | 00000000000000F0000000000000000 |
| X-QQ-BUSINESS-ORIGIN | 2 |
| X-Originating-IP | 113.116.67.189 |
| X-QQ-STYLE | |
| X-QQ-mid | webmail436t1315967976t2452908 |
| From | "守株待兔" <1248283536@qq.com> |
| To | "python-list" <python-list@python.org> |
| Subject | Connection reset by peer |
| Mime-Version | 1.0 |
| Content-Type | multipart/alternative; boundary="----=_NextPart_4E7013E8_0866E9F0_12665F52" |
| Content-Transfer-Encoding | 8Bit |
| Date | Wed, 14 Sep 2011 10:39:36 +0800 |
| X-Priority | 3 |
| X-QQ-MIME | TCMime 1.0 by Tencent |
| X-Mailer | QQMail 2.x |
| X-QQ-Mailer | QQMail 2.x |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1099.1315967984.27778.python-list@python.org> (permalink) |
| Lines | 121 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1315967984 news.xs4all.nl 2425 [2001:888:2000:d::a6]:44458 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:13258 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
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):
self.jobs = Queue.Queue()
if x in name:
self.jobs.put(x)
def download(self):
try:
weburl=self.jobs.get()
url = weburl
hx = httplib2.Http()
resp, content = hx.request(url, headers=headers)
print
self.jobs.task_done()
except:
print url,"wrong"
self.jobs.task_done()
def run(self):
for i in range(30):
threading.Thread(target=self.download).start()
self.jobs.join()
if __name__=="__main__":
webdata('quote').run()
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/__init__.py", 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/__init__.py", line 1188, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/local/lib/python2.7/dist-packages/httplib2/__init__.py", line 1171, in _conn_request
content = response.read()
File "/usr/lib/python2.7/httplib.py", line 541, in read
return self._read_chunked(amt)
File "/usr/lib/python2.7/httplib.py", line 590, in _read_chunked
value.append(self._safe_read(chunk_left))
File "/usr/lib/python2.7/httplib.py", line 647, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
File "/usr/lib/python2.7/socket.py", 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??
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Connection reset by peer "守株待兔" <1248283536@qq.com> - 2011-09-14 10:39 +0800
csiph-web