Closed absudabsu closed 8 years ago
Looks like the default encoding on your system is set to ASCII instead of UTF-8. This issue will be fixed in the next release.
I could reproduce the error by setting the LC_CTYPE
environment variable to C
.
LC_CTYPE=C python setup.py build
Traceback (most recent call last):
File "setup.py", line 18, in <module>
long_description = fp.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 0xc3 in position 1883: ordinal not in range(128)
Thanks, I figured as much, but didn't think to check the src. As a sidenote, is this a python default or system default?
From the Python 3 Docs
In text mode, if encoding is not specified the encoding used is platform dependent: locale.getpreferredencoding(False) is called to get the current locale encoding.
During the setup/build process the README.rst is read to provide the long description for the package. There are some UTF-8 characters in this file. That's why the build process fails on systems that don't use UTF-8 as their default encoding.
I have merged a fix and it should be available in the next release.
Thanks for your help. I was wondering if you knew when the next release would be?
Also, I'm not sure its an default encoding issue, since:
$ python3 -c 'import sys; print(sys.getdefaultencoding())'
utf-8
$ sudo pip3 install overpy
Collecting overpy
Using cached overpy-0.3.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-5m016bco/overpy/setup.py", line 12, in <module>
long_description = f.read()
File "/usr/lib64/python3.5/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 1883: ordinal not in range(128)
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-5m016bco/overpy
You are using pip version 8.0.2, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command
Maybe pip3 relies on python2?:
$ python -c 'import sys; print(sys.getdefaultencoding())'
ascii
That doesn't make sense to me, though.
pip3 install fails:
but it works for python2
Any ideas?