Comments (6)
Looks like the issue is actually being caused by evenlet, which I enable if it's installed.
In the next release, the library won't monkeypatch automatically, which will fix this issue. I hope to push that out this evening, or tomorrow.
In the meantime, either uninstall eventlet from your virtualenv or take out these lines (https://github.com/kennethreitz/requests/blob/master/requests/core.py#L19-30)
from requests.
Hi,
thanks for the quick answer...
I did that, doing so raises this exception:
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 383, in open
response = self._open(req, data)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 401, in _open
'_open', req)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 361, in _call_chain
result = func(*args)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1130, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urllib2.py", line 1102, in do_open
h.request(req.get_method(), req.get_selector(), req.data, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 874, in request
self._send_request(method, url, body, headers)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 914, in _send_request
self.send(body)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/httplib.py", line 719, in send
self.sock.sendall(str)
File "", line 1, in sendall
TypeError: sendall() argument 1 must be string or buffer, not instance
Where str in self.sock.sendall(str) is an instance of multipart_yielder which is being passed for some reason. I've noticed that using auth, the _StreamingHTTPMixin is not called I might be wrong though...
from requests.
Hmm, thanks for letting me know. You're using the Python 2.6 that comes with Snow Leopard?
from requests.
Yeap, I have a small workaround for this (just waiting for your commit). If you haven't fixed this I can fork and do the pull request.
from requests.
I haven't fixed it yet. If you have, feel free to send a pull request. :)
from requests.
Merged!
from requests.
Related Issues (20)
- Wrong CA Certificates used in requests.Session.send
- POST with multiple files with the form-data sends only 1 file. HOT 4
- Max retries exceeded with url HOT 1
- Document which exceptions request() might raise HOT 2
- The content for this response was already consumed HOT 4
- Post Request Status and header error. HOT 1
- Post requests with unicode chars in string as data sends incomplete/trimmed data (in >=2.30 with urllib3 2.0) HOT 1
- REQUESTS_CA_BUNDLE and CURL_CA_BUNDLE environment variables get ignored when in a venv HOT 2
- How to download multiple files in local system using POST API request in python rather than in ascii or binary form data ? HOT 1
- Is feature freeze permanent? HOT 1
- Is feature freeze permanent? HOT 2
- Consider making certifi an optional dependency HOT 1
- Failed to ignore the SSL certificate verification when using `verify=False` option HOT 5
- Support for PKey (openssl) or cryptography Key classes in cert parameter in request (and linked) calls HOT 1
- [AttributeError]: Module 'collections' has no attribute 'MutableMapping' HOT 1
- Error in requests version 2.31.0 with urllib3 2.2.1 and 2.10 raise IncompleteRead(self._fp_bytes_read, self.length_remaining) HOT 2
- pytest.warns(None) is no longer supported HOT 4
- what if someone sets both data and files when making a request? HOT 1
- raise_for_status documentation is out of sync HOT 4
- Issue With Decimals In JSON Handling HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from requests.