开发者

getting Connection reset by peer error using urllib2

开发者 https://www.devze.com 2023-01-07 21:33 出处:网络
I\'m getting this error: socket.error: [Errno 54] Connection reset by peer All I\'m trying to do is the following in python:

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

精彩评论

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