Skip to content

Installation failed to run on python 3.x when command line encoding is not utf8 and readme_file contains non-ASCII characters #144

@ghost

Description

Originally reported by: felixonmars (Bitbucket: felixonmars, GitHub: felixonmars)


readme_file.read() will try to use 'ascii' to decode, and thus failed. For example, set LANG=C and get this:

#!python

Traceback (most recent call last):
  File "setup.py", line 93, in <module>
    long_description = readme_file.read() + '\n' + changes_file.read()
  File "/usr/lib/python3.3/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 7330: ordinal not in range(128)

I filed a patch for the same problem to python-Levenshtein, hope it helps:
ztane/python-Levenshtein#2


Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions