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

AttributeError: module 'spnego' has no attribute 'ContextProxy' #133

Closed
elarivie opened this issue Mar 3, 2023 · 0 comments · Fixed by #135
Closed

AttributeError: module 'spnego' has no attribute 'ContextProxy' #133

elarivie opened this issue Mar 3, 2023 · 0 comments · Fixed by #135

Comments

@elarivie
Copy link

elarivie commented Mar 3, 2023

Hello,

I am receiving this error:

Stacktrace

...
Traceback (most recent call last):
  File "C:\Users\eric-l\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\eric-l\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "...", line 18, in <module>
    from requests_ntlm import HttpNtlmAuth
  File "C:\Users\eric-l\AppData\Local\Programs\Python\Python39\lib\site-packages\requests_ntlm\__init__.py", line 1, in <module>
    from .requests_ntlm import HttpNtlmAuth
  File "C:\Users\eric-l\AppData\Local\Programs\Python\Python39\lib\site-packages\requests_ntlm\requests_ntlm.py", line 14, in <module>
    class ShimSessionSecurity:
  File "C:\Users\eric-l\AppData\Local\Programs\Python\Python39\lib\site-packages\requests_ntlm\requests_ntlm.py", line 17, in ShimSessionSecurity
    def __init__(self, context: spnego.ContextProxy) -> None:
AttributeError: module 'spnego' has no attribute 'ContextProxy'

The error is there:

def __init__(self, context: spnego.ContextProxy) -> None:

I checked the spnego module
https://github.com/jborean93/pyspnego/blob/e3c1d101a79e5a055ee390e8f9bd8458c1192da8/src/spnego/_context.py#L211

and it seems like ContextProxy is at

  • spnego._context.ContextProxy
    and not at:
  • spnego.ContextProxy

While looking about this error I also found: maurosoria/dirsearch#1285 which talks about the same issue

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