requests: TypeError: getresponse() got an unexpected keyword argument 'buffering'
Requests 2.2.1. Same thing happens in 1.2.3 (I upgraded from that).
I get this traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.3/site-packages/requests/packages/urllib3/connectionpool.py", line 313, in _make_request
httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.3/site-packages/requests/packages/urllib3/connectionpool.py", line 480, in urlopen
body=body, headers=headers)
File "/usr/local/lib/python3.3/site-packages/requests/packages/urllib3/connectionpool.py", line 315, in _make_request
httplib_response = conn.getresponse()
File "/usr/local/lib/python3.3/http/client.py", line 1147, in getresponse
response.begin()
File "/usr/local/lib/python3.3/http/client.py", line 358, in begin
version, status, reason = self._read_status()
File "/usr/local/lib/python3.3/http/client.py", line 328, in _read_status
raise BadStatusLine(line)
http.client.BadStatusLine: ''
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.3/site-packages/requests/adapters.py", line 330, in send
timeout=timeout
File "/usr/local/lib/python3.3/site-packages/requests/packages/urllib3/connectionpool.py", line 530, in urlopen
raise MaxRetryError(self, url, e)
requests.packages.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='heimdallr.jcea.es', port=443): Max retries exceeded with url: /PANICO (Caused by <class 'http.client.BadStatusLine'>: '')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./heimdallr.py", line 203, in <module>
module.start()
File "__main__", line 59, in start
File "main", line 23, in start
File "panic_report", line 17, in envia_tb_pendiente
File "/usr/local/lib/python3.3/site-packages/requests/sessions.py", line 425, in post
return self.request('POST', url, data=data, **kwargs)
File "auth_http", line 48, in request
File "/usr/local/lib/python3.3/site-packages/requests/sessions.py", line 383, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.3/site-packages/requests/sessions.py", line 486, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.3/site-packages/requests/adapters.py", line 378, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='heimdallr.jcea.es', port=443): Max retries exceeded with url: /PANICO (Caused by <class 'http.client.BadStatusLine'>: '')
Makefile:69: recipe for target 'run' failed
make: *** [run] Error 1
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 36 (16 by maintainers)
Commits related to this issue
- Use setuptools and add install_requires argument to solve problem https://github.com/kennethreitz/requests/issues/1915 . — committed to dodo5522/solar_monitor by dodo5522 9 years ago
I had the same problem. Fixed by updating requests
pip install --upgrade requests@piyushjajoo No you aren’t. Please read this issue carefully. I made this comment, which linked to this comment from issue #1289. Once again, reproducing the body of the comment:
In your case, the real exception you care about is the last one: the
ReadTimeoutError. You should pursue that one.