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

Install fails with UnicodeDecodeError in some locales #17

Open
dcgloe opened this issue Sep 3, 2020 · 1 comment
Open

Install fails with UnicodeDecodeError in some locales #17

dcgloe opened this issue Sep 3, 2020 · 1 comment

Comments

@dcgloe
Copy link

dcgloe commented Sep 3, 2020

When trying to install python-string-utils with python 3.6 and pip 20.0.2 in a SLES 15 SP1 docker container, the install fails with this error:

    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4lc71oyc/python-string-utils/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4lc71oyc/python-string-utils/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-4lc71oyc/python-string-utils/pip-egg-info
         cwd: /tmp/pip-install-4lc71oyc/python-string-utils/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4lc71oyc/python-string-utils/setup.py", line 4, in <module>
        long_description = readme.read()
      File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 8392: ordinal not in range(128)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

README.md has some non-ASCII characters, and it appears that the locale in the docker container uses ascii encoding by default. Likely setup.py just needs to specify utf-8 encoding to open README.md.

@hswong3i
Copy link

hswong3i commented Sep 7, 2021

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

2 participants