You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/private/tmp/test.py", line 9, in <module>
profile = client.get_profile().profile()
File "/usr/local/lib/python3.9/site-packages/zwift/profile.py", line 12, in profile
return self.request.json('/api/profiles/{}'.format(self.player_id))
File "/usr/local/lib/python3.9/site-packages/zwift/request.py", line 33, in json
headers = self.get_headers(accept_type='application/json')
File "/usr/local/lib/python3.9/site-packages/zwift/request.py", line 27, in get_headers
"Authorization": "Bearer " + self.get_access_token()
File "/usr/local/lib/python3.9/site-packages/zwift/auth.py", line 75, in get_access_token
self.update_token_data()
File "/usr/local/lib/python3.9/site-packages/zwift/auth.py", line 55, in update_token_data
self.access_token_expiration = now + self.expires_in - 5
TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'
A single print() statement revealed:
{'error': 'invalid_grant', 'error_description': 'Invalid user credentials'}
As it turns out, I just had a typo in my user name. It would be nice if, instead of crashing, zwift-client would print a message or raise an exception if it detected wrong credentials.
The text was updated successfully, but these errors were encountered:
Description
zwift-client crashes with wrong user credentials instead of giving an error message (or raising an exception).
What I Did
I was testing out zwift-client with a simple script:
and I got a weird error:
A single print() statement revealed:
As it turns out, I just had a typo in my user name. It would be nice if, instead of crashing, zwift-client would print a message or raise an exception if it detected wrong credentials.
The text was updated successfully, but these errors were encountered: