marthoc / pykuna

Python3 library for interacting with the Kuna camera mobile API
MIT License
4 stars 1 forks source link

example.py throws login error #8

Open Rathna-K opened 4 years ago

Rathna-K commented 4 years ago

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 commented 4 years ago

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