Closed gitagogaming closed 1 year ago
most things that returned a dictionary now return an object. everything is now async so you need to await alot of the function calls.
You might want to take a look at the V2 to V3 migration guid
https://pytwitchapi.readthedocs.io/en/stable/v3-migration.html
Just as a friendly Information, for future projects of yours: If a library bumps its major version number (like happened here from 2 to 3) its normaly combined with breaking changes.
There are exceptions to this rule. Some Libs don't include breaking changes with a major version bump, others have it with a minor version.
Clearly I've been a bit behind on keeping up to date it appears and today I decided to get the most recent version.
So after the upgrade I immediately starting having issues with everything.
1) data = twitch.get_users(logins=[broadcaster_username_TP])
I use to retrieve the ID like so
the_broadcaster_id = data['data'][0]['id']
but now it is returning the error above.2) When I manually set the broadcaster_id I then get another error when checking the token for this user, and its very similar.
the error it shows is
AttributeError: 'coroutine' object has no attribute 'get'
and when I bypass this error, again I am getting
TypeError: 'coroutine' object is not subscriptable
in other spots..Does anyone know what may be causing this all thruout my program now?