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

Fixing issue with non-ASCII characters in README.rst #23

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

Conversation

karthich
Copy link

When I try to install python-ach module in a docker image, I get this error.

Running setup.py (path:/tmp/pip_build_root/ach/setup.py) egg_info for package ach
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/ach/setup.py", line 14, in <module>
        long_description=open('README.rst').read(),
      File "/usr/lib/python3.4/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 234: ordinal not in range(128)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/ach/setup.py", line 14, in <module>

    long_description=open('README.rst').read(),

  File "/usr/lib/python3.4/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 234: ordinal not in range(128)

This is an issue with non-ASCII characters being in the README. We can fix this by using codecs.open('README.rst', encoding='utf-8').read() instead of open('README.rst').read() (the change is both python3 and python2 compatible).

Similar to this issue on urllib3:
urllib3/urllib3#823

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