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

HTTP Basic Auth - sending username but no password triggers exception #38

Open
philipithomas opened this issue Feb 25, 2017 · 1 comment

Comments

@philipithomas
Copy link

Reported on our repo here: Staffjoy/suite#3

We send an API key as an HTTP basic username without a password, e.g. curl --user API_KEY: http://app.local. This appears to throw the following error on python 2.7 with unirest 1.1.7:

Traceback (most recent call last):
  File "/opt/python/2.7.12/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/opt/python/2.7.12/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/travis/virtualenv/python2.7.12/lib/python2.7/site-packages/unirest/__init__.py", line 82, in __request
    encoded_string = base64.b64encode(user + ':' + password)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
@Marlysson
Copy link

You solved this error?

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

2 participants