05-07-2017 20:00 - edited 05-07-2017 20:03
05-07-2017 20:00 - edited 05-07-2017 20:03
Dear fitbit community,
A year ago I wrote your average python script to download heart-rate datasets from fitbit's servers. Everything worked just fine! I now ran the script again and got an error stating that "OAuth2Server instance has no attribute 'oauth'".
So, in my code (as in those based on python-fitbit demos), variable "server" was assigned Oauth2.OAuth2Server(USER_ID, CLIENT_SECRET). And in the past,
print('FULL RESULTS = %s' % server.oauth.token)
got me a
FULL RESULTS = {u'token_type': u'Bearer', u'user_id': ...
kind of an output. But it now gives me "AttributeError: OAuth2Server instance has no attribute 'oauth'". Naturally, ANY server.oauth ... call gets me the same error.
I updated "requests", "requests-oauthlib", and many other pertinent libraries. But I get said error and haven't a clue what to do about it. I appeal to your collective genius! Take pity on a wimp!
Trecientos
05-07-2017 23:13
05-07-2017 23:13
Nevermind! Did some comparing between new and old gather_keys_oauth2.py and found the difference. Cheers anyway!
T
11-09-2017 05:33
11-09-2017 05:33
I have the same error; any chance you could share your solution?
02-13-2018 12:23
02-13-2018 12:23
instead of server.oauth.token
try server.fitbit.client.session.token