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

ch-image --help crashes with LC_ALL=C under Python 3.6 #1629

Closed
reidpr opened this issue Apr 12, 2023 · 0 comments · Fixed by #1631
Closed

ch-image --help crashes with LC_ALL=C under Python 3.6 #1629

reidpr opened this issue Apr 12, 2023 · 0 comments · Fixed by #1631
Assignees
Milestone

Comments

@reidpr
Copy link
Collaborator

reidpr commented Apr 12, 2023

For example:

$ python3 --version
Python 3.6.8
$ LC_ALL=C bin/ch-image --help
Traceback (most recent call last):
  [...]
  File "/usr/lib64/python3.6/argparse.py", line 2372, in _print_message
    file.write(message)
UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 1792: ordinal not in range(128)

This was printed inside argparse. Messages we log don't crash but get escaped in an ugly way:

$ LC_ALL=en_US.UTF-8 bin/ch-image list
crash “me”
$ LC_ALL=C bin/ch-image list
crash \u201cme\u201d

It doesn't seem to happen under Python 3.9. I haven't tried to narrow down the version boundary.

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

Successfully merging a pull request may close this issue.

2 participants