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

example.py throws login error #8

Open
Rathna-K opened this issue Feb 20, 2020 · 1 comment
Open

example.py throws login error #8

Rathna-K opened this issue Feb 20, 2020 · 1 comment

Comments

@Rathna-K
Copy link

Rathna-K commented Feb 20, 2020

not sure if i am doing it correctly but when I run the example.py with the correct username and password i am getting this:

Kuna API request error: 400, message='Bad Request', url=URL('https://server.kunasystems.com/api/v1/account/auth/')
Traceback (most recent call last):
File "/home/environments/kuna/lib/python3.7/site-packages/pykuna/kuna.py", line 37, in authenticate
self._token = result["token"]
TypeError: 'NoneType' object is not subscriptable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "example.py", line 38, in
loop.run_until_complete(main())
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "example.py", line 20, in main
await kuna.authenticate()
File "/home/environments/kuna/lib/python3.7/site-packages/pykuna/kuna.py", line 40, in authenticate
"No Kuna API token response returned, check username and password."
pykuna.errors.AuthenticationError: No Kuna API token response returned, check username and password.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7fc027171978>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7fc025e3fe80>, 1669.5269498)]']
connector: <aiohttp.connector.TCPConnector object at 0x7fc0271719b0>

@marthoc
Copy link
Owner

marthoc commented Mar 10, 2020

Are you sure the username and password are correct? Username is an email address and password is a string.

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