Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

UnicodeDecodeError when trying to build on non UTF-8 environment #124

Merged
merged 2 commits into from
Jun 24, 2015
Merged

UnicodeDecodeError when trying to build on non UTF-8 environment #124

merged 2 commits into from
Jun 24, 2015

Conversation

Fedalto
Copy link
Contributor

@Fedalto Fedalto commented Jun 24, 2015

Hi,

I got an UnicodeDecodeError trying to read README.rst when my locale was anything other than UTF-8.
I made a change to specify the encoding when opening the file. And also removed the unicode character on README.rst.

You can reproduce the error:

$ LC_ALL=C python3 setup.py build

Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    ldesc = read_file('README.rst')
  File "setup.py", line 17, in read_file
    file_name
  File "/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/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 7085: ordinal not in range(128)

ekalinin added a commit that referenced this pull request Jun 24, 2015
UnicodeDecodeError when trying to build on non UTF-8 environment
@ekalinin ekalinin merged commit 721b0d7 into ekalinin:master Jun 24, 2015
@ekalinin
Copy link
Owner

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants