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.
精彩评论