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

Use UTF-8 encoding to read the README file #1

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

Conversation

suntonix
Copy link

@suntonix suntonix commented Dec 1, 2019

I had trouble installing this package on a system that uses a locale without Unicode:

me@home:~$ python3 setup.py
Traceback (most recent call last):
  File "setup.py", line 93, in <module>
    LONG_DESCRIPTION = project_content('README.md')
  File "setup.py", line 77, in project_content
    out += handle.read()
  File "/usr/lib/python3.5/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 99: ordinal not in range(128)

Explicitly setting the encoding to 'utf-8' in the call to open() fixes this problem.

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.

1 participant