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

Update setup.py to prevent UnicodeDecodeError #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MorrisChuang
Copy link

Use "utf8" encoding to open "README.rst" to prevent UnicodeDecodeError below.
UnicodeDecodeError: 'cp950' codec can't decode byte 0xe2 in position 189: illegal multibyte sequence

Use "utf8" encoding to open "README.rst" to prevent UnicodeDecodeError below.
UnicodeDecodeError: 'cp950' codec can't decode byte 0xe2 in position 189: illegal multibyte sequence
@maozza
Copy link

maozza commented Aug 4, 2020

The same issue for me, the README.rst on line 5 position 51 (I think) is a non ascii character.
full error:

     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-cqtjn5f9/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-cqtjn5f9/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-pip-egg-info-t__bxh4k
         cwd: /tmp/pip-req-build-cqtjn5f9/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-cqtjn5f9/setup.py", line 7, in <module>
        readme = f.read()
      File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 189: 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.

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

Successfully merging this pull request may close these issues.

2 participants