Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encode error on login sequence #11

Closed
trideck opened this issue Apr 16, 2018 · 1 comment
Closed

Encode error on login sequence #11

trideck opened this issue Apr 16, 2018 · 1 comment

Comments

@trideck
Copy link

trideck commented Apr 16, 2018

After the latest release, when I try to upload a file, always shows the same error: 'ascii' codec can't encode character u'\xe9' in position 3: ordinal not in range(128)

gupload -v1 2018-04-01_13-03-44_4_5.fit
2018-04-16 12:35:32,898 [DEBUG] File '/home/jsanjuan/.config/antfs-cli/3906488152/activities/2018-04-01_13-03-44_4_5.fit' has extension '.fit'
2018-04-16 12:35:32,899 [DEBUG] File '/home/jsanjuan/.config/antfs-cli/3906488152/activities/2018-04-01_13-03-44_4_5.fit' extension '.fit' is valid.
2018-04-16 12:35:32,899 [DEBUG] Using credentials from '/home/jsanjuan/.guploadrc'.
2018-04-16 12:35:32,900 [INFO] Try to login on GarminConnect...
2018-04-16 12:35:32,900 [DEBUG] Username: jsanjuandeive@gmail.com
2018-04-16 12:35:32,900 [DEBUG] Password: ********
2018-04-16 12:35:34,264 [DEBUG] Found service ticket ST-21114659-zFFaFlykPfES9zDLSoVo-cas
2018-04-16 12:35:35,477 [CRITICAL] Login Failure: 'ascii' codec can't encode character u'\xe9' in position 3: ordinal not in range(128)
Error: Invalid credentials

The installed version is the latest avaliable by pip.

¿Do you have any idea of what the problem is?.

Thanks in advance.

@trideck
Copy link
Author

trideck commented Apr 16, 2018

It seems that only one line is liable of the problem. In api.py line 138, I change:

logger.info('Logged in as {}'.format(garmin_user['fullName']))

to

logger.info('Logged in as {}'.format(garmin_user['fullName'].encode('utf-8')))

In my case, the name has ASCII chars. That's the problem.

Maybe you can include in the next release.

Thank's

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant