tags:

views:

35

answers:

0

Hi,

I'm getting this error:

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

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

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

Some previous related questions suggested using time.sleep to fiddle with the threads. I didn't have any success with that, but would appreciate any suggestions.

Thanks!