You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When doing PUT/POST this seems to run into an issue on Python 3 where streams are functioning slightly differently.
File "/home/db/development/test/lib/python3.8/site-packages/requests/sessions.py", line 512, in request
resp = self.send(prep, **send_kwargs)
File "/home/db/development/test/lib/python3.8/site-packages/requests/sessions.py", line 629, in send
r = dispatch_hook('response', hooks, r, **kwargs)
File "/home/db/development/test/lib/python3.8/site-packages/requests/hooks.py", line 31, in dispatch_hook
_hook_data = hook(hook_data, **kwargs)
File "/home/db/development/pydev/mav_requests_ntlm/requests_ntlm.py", line 149, in response_hook
return self.retry_using_http_NTLM_auth(
File "/home/db/development/pydev/mav_requests_ntlm/requests_ntlm.py", line 65, in retry_using_http_NTLM_auth
response.request.body.seek(-content_length, 1)
io.UnsupportedOperation: can't do nonzero cur-relative seeks
Tested with 3.6 and 3.8, using requests_ntlm module to send a PUT or POST request:
At this point I don't fully understand the issue beyond what seems obvious. Wondering if would need to do something like https://2.python-requests.org/en/v3.0.0/_modules/requests/auth/ to record offset position at points in time, and then seek back to it. Would this be a viable option?
For any others with the same issue, I could not find a simple workaround to get this going. I would suggest using https://github.com/pycurl/pycurl (for now) if you have a need to PUT/POST things to an NTLM authed endpoint using python 3.
When doing PUT/POST this seems to run into an issue on Python 3 where streams are functioning slightly differently.
Tested with 3.6 and 3.8, using requests_ntlm module to send a PUT or POST request:
The text was updated successfully, but these errors were encountered: