开发者

getting Connection reset by peer error using urllib2

I'm getting this error:

socket.error: [Errno 54] Connection reset by peer

All I'm trying to do is the following in python:

import urllib, utllib2

data = urllib.urlencode(values)
req = urllib2.Request(url, data)
response = urllib2.urlopen(req)
id = response.read()

Some previous related questions suggested us开发者_如何学Pythoning time.sleep to fiddle with the threads. I didn't have any success with that but I would appreciate any suggestions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜