Re: IOError 35 when trying to read the result of call to urllib2.urlopen

2011-09-10 Thread matt
On Sep 9, 6:02 pm, Steven D'Aprano wrote: > matt wrote: > > When I try to look at "resp_body" I get this error: > > > IOError: [Errno 35] Resource temporarily unavailable > > > I posted to the same URI using curl and it worked fine, so I don't > > think it has to do with the server. > > Are your P

Re: IOError 35 when trying to read the result of call to urllib2.urlopen

2011-09-09 Thread Steven D'Aprano
matt wrote: > When I try to look at "resp_body" I get this error: > > IOError: [Errno 35] Resource temporarily unavailable > > I posted to the same URI using curl and it worked fine, so I don't > think it has to do with the server. Are your Python code and curl both using the same proxy? It may

IOError 35 when trying to read the result of call to urllib2.urlopen

2011-09-09 Thread matt
I'm using urllib2's urlopen function to post to a service which should return a rather lengthy JSON object as the body of its response. Here's the code: {{{ ctype, body = encode_multipart(fields, files) url = 'http://someservice:8080/path/to/resource' headers = {'Content-Type': ctype, 'Content-Len