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

Cannot install with pip3 -- README.rst contains non-ascii character. #68

Closed
Grazfather opened this issue Sep 15, 2015 · 2 comments
Closed

Comments

@Grazfather
Copy link
Contributor

$ pip3 install schema
Downloading/unpacking schema
  Downloading schema-0.3.1.tar.gz
  Running setup.py (path:/private/tmp/pip_build_bla/schema/setup.py) egg_info for package schema
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/private/tmp/pip_build_bla/schema/setup.py", line 16, in <module>
        long_description=open('README.rst').read(),
      File "/usr/local/Cellar/python3/3.4.2_1/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 2360: 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 "/private/tmp/pip_build_bla/schema/setup.py", line 16, in <module>

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

  File "/usr/local/Cellar/python3/3.4.2_1/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 2360: ordinal not in range(128)

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/tmp/pip_build_bla/schema
Storing debug log for failure in /Users/bla/.pip/pip.log

The culprit line in the readme is here:

Alternatively, you can just drop `schema.py` file into your project—it is self-contained.

(The m-width dash)

If I set LANG=utf-8, it works:

$ LANG=utf-8 pip install schema
Downloading/unpacking schema
  Downloading schema-0.3.1.tar.gz
  Running setup.py (path:/Users/bla/tmpvenv/build/schema/setup.py) egg_info for package schema

Installing collected packages: schema
  Running setup.py install for schema

Successfully installed schema
Cleaning up...
@Grazfather
Copy link
Contributor Author

You could just remove that character, or modify setup.py:

open('README.rst', encoding='utf8').read()

@Grazfather
Copy link
Contributor Author

The above is python3 only. To make it work on both we need to use codecs. I fixed my PR.

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

No branches or pull requests

1 participant