question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pywin32 issue under Python 3.6.1 breaks requests-negotiate-sspi as well

See original GitHub issue

Getting an error due to stricter datetime handling in Python 3.6.1:

r = requests.get(url, auth=HttpNegotiateAuth())
Traceback (most recent call last):
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\IPython\core\interactiveshell.py", line 2881, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-5-8021f690f902>", line 4, in <module>
    r = requests.get('http://test-smfbasic:15000/api/InstrumentIds?callerId=bc7611', auth=HttpNegotiateAuth())
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\requests\api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\requests\api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\requests\sessions.py", line 625, in send
    r = dispatch_hook('response', hooks, r, **kwargs)
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\requests\hooks.py", line 31, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\requests_negotiate_sspi\requests_negotiate_sspi.py", line 190, in _response_hook
    return self._retry_using_http_Negotiate_auth(r, scheme, kwargs)
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\requests_negotiate_sspi\requests_negotiate_sspi.py", line 73, in _retry_using_http_Negotiate_auth
    clientauth = sspi.ClientAuth(scheme, targetspn=targetspn, auth_info=self._auth_info)
  File "C:\bers\winpython\python-3.6.1.amd64\lib\site-packages\win32\lib\sspi.py", line 111, in __init__
    None, auth_info)
ValueError: year 30828 is out of range

This was apparently solved in requests-kerberos by switching from kerberos-sspi to WinKerberos: https://github.com/requests/requests-kerberos/issues/99

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
brandondcommented, Jan 26, 2018

Thanks @dhirschfeld! Procrastination wins again!

1reaction
dhirschfeldcommented, Jan 29, 2018

Likely not installed properly. Was it pypiwin32 or maybe installed via pip?

See: https://github.com/mhammond/pywin32/issues/748#issuecomment-360328766

Read more comments on GitHub >

github_iconTop Results From Across the Web

[python-win32] problem installing pywin with Python 3.6
When I try to install pywin32-220.win32-py3.6.exe I get an error dialog indicating Python 3.6 is required but not found in the registry.
Read more >
PyWin32 and Python 3.8.0 - Stack Overflow
Anyway, applying the changes locally (1) (on both my Python VirtualEnvs), solved the problem (on one, and didn't break the other):.
Read more >
How to install the win32com python library - Super User
Start a command line with admin rights. python -m pip install pywin32. C:\Program Files\Stackless36\Scripts>python pywin32_postinstall.py -install The path ...
Read more >
Python for Windows Extensions - Browse /pywin32/Build 219 ...
Python wrapper for global input hooks in Windows. The package provides callbacks for mouse and keyboard events; events can be monitored and filtered....
Read more >
pywin32 · PyPI
Installing via PIP. You should install pywin32 via pip - eg,. python -m pip install --upgrade pywin32. If you encounter any problems when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found