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

Traceback occurred #69

Open
dalevova opened this issue May 24, 2016 · 2 comments
Open

Traceback occurred #69

dalevova opened this issue May 24, 2016 · 2 comments

Comments

@dalevova
Copy link

dalevova commented May 24, 2016

For version 0.3.0 traceback occurred (for 0.2.0 works as expected)

Headers:
Status code: 401 Unauthorized
WWW-Authenticate:"Basic realm="data""

  File "/env/lib/python2.7/site-packages/requests/api.py", line 71, in get
    return request('get', url, params=params, **kwargs)
  File "/env/lib/python2.7/site-packages/requests/api.py", line 57, in request
    return session.request(method=method, url=url, **kwargs)
  File "/env/lib/python2.7/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/env/lib/python2.7/site-packages/requests/sessions.py", line 591, in send
    r = dispatch_hook('response', hooks, r, **kwargs)
  File "/env/lib/python2.7/site-packages/requests/hooks.py", line 31, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "/env/lib/python2.7/site-packages/requests_ntlm/requests_ntlm.py", line 130, in response_hook
    'Authorization', r, auth_type, kwargs)
UnboundLocalError: local variable 'auth_type' referenced before assignment
@Lukasa
Copy link
Member

Lukasa commented May 24, 2016

Yup, so that traceback is bad. However, it reveals a problem in your code: you're not getting an NTLM challenge, you're getting a Basic auth challenge. Why are you using requests-ntlm in that case?

@carsonyl
Copy link

It looks like #73 resolved this, right?

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

No branches or pull requests

3 participants