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

Client/Common utils: correctly handle utf locales #4503

Closed
rcarpa opened this issue Mar 29, 2021 · 0 comments
Closed

Client/Common utils: correctly handle utf locales #4503

rcarpa opened this issue Mar 29, 2021 · 0 comments
Assignees

Comments

@rcarpa
Copy link
Contributor

rcarpa commented Mar 29, 2021

Motivation

c2f12d4 added .decode() on the output or process.communicate(). By default, the ascii decoder is used, which fails and raises an exception on unicode characters.

2021-03-29 11:15:18,902    DEBUG    downloadclient.py    'ascii' codec can't decode byte 0xc2 in position 29: ordinal not in range(128)

Modification

Probably it's enough to just swhitch to the utf8 decoder by default.

@rcarpa rcarpa self-assigned this Mar 29, 2021
@rcarpa rcarpa added the bug label Mar 29, 2021
@bari12 bari12 added the Clients label Mar 29, 2021
rcarpa added a commit to rcarpa/rucio that referenced this issue Apr 9, 2021
The default encoding in python27 is 'ascii', but 'utf-8' in python3.
Explicitly set it to 'utf-8'.
bari12 added a commit that referenced this issue Apr 9, 2021
…_execute

Clients: default to utf-8 encoding in execute(). #4503
bari12 pushed a commit that referenced this issue Apr 9, 2021
The default encoding in python27 is 'ascii', but 'utf-8' in python3.
Explicitly set it to 'utf-8'.
@bari12 bari12 added this to the 1.25.3-clients milestone Apr 9, 2021
@bari12 bari12 closed this as completed Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants