Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Errno 32] Broken pipe when using httplib #96

Open
fatuhoku opened this issue Sep 15, 2013 · 0 comments
Open

[Errno 32] Broken pipe when using httplib #96

fatuhoku opened this issue Sep 15, 2013 · 0 comments

Comments

@fatuhoku
Copy link

     Failure/Error: [Errno 32] Broken pipe

     Traceback:
     ...
     File "/usr/local/lib/python2.7/site-packages/httpretty/core.py", line 807, in wrapper
         return test(*args, **kw)
     File "src/integrationtest/python/reconciliation_spec.py", line 61, in involves_uploading_the_photo_and_marking_the_photo_as_mapped
         hidden=2)
     File "/usr/local/lib/python2.7/site-packages/flickr_api/upload.py", line 92, in upload
         r = post(UPLOAD_URL,auth.AUTH_HANDLER,args,photo_file)
     File "/usr/local/lib/python2.7/site-packages/flickr_api/upload.py", line 52, in post
         r = multipart.posturl(url,fields,files)
     File "/usr/local/lib/python2.7/site-packages/flickr_api/multipart.py", line 19, in posturl
         return post_multipart(urlparts[1], urlparts[2], fields,files)
     File "/usr/local/lib/python2.7/site-packages/flickr_api/multipart.py", line 33, in post_multipart
         h.send(body)
     File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 805, in send
         self.sock.sendall(data)
     File "/usr/local/lib/python2.7/site-packages/httpretty/core.py", line 243, in sendall
         return self._true_sendall(data)
     File "/usr/local/lib/python2.7/site-packages/httpretty/core.py", line 216, in _true_sendall
         self.truesock.sendall(data, *args, **kw)
     File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
         return getattr(self._sock,name)(*args)

The test is actually uploading a photo file to the server in this case, so it looks like httpretty is closing the 'connection' prematurely. Give it some time for the transfer to actually complete before sending a response!

See my SO question for further details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant