-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Trying to follow the Getting started but keep getting this error
>>> init('myusername', store=True)
Traceback (most recent call last):
File "<python-input-3>", line 1, in <module>
init('myusername', store=True)
~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/home/myusername/venv/lib/python3.13/site-packages/trakt/core.py", line 69, in init
return init_auth(AUTH_METHOD, *args, **kwargs)
File "/home/myusername/venv/lib/python3.13/site-packages/trakt/auth/__init__.py", line 69, in init_auth
client_id, client_secret = get_client_info(adapter.NEEDS_APPLICATION_ID, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'function' object has no attribute 'NEEDS_APPLICATION_ID'
The problem is that adapter is a function pointer which simply does not have the NEEDS_APPLICATION_ID property, defined in the BaseAdapter class.
The only way I got a working authentication and was able to use the API was using
init('myusername', client_id=my_client_id, client_secret=my_client_secret)
by appending the store=True option to the last call I was able to get a correctly filled ~/.pytrakt.json but I am unable to reload it without requiring to repeat the authorization process.
Even after replacing the adapter.NEEDS_APPLICATION_ID above with False it seems the stored config data is not read but a re-auth is requested every time.
Metadata
Metadata
Assignees
Labels
No labels