Closed hroskes closed 3 years ago
I'm curious, what platform and pip version does not support Unicode?
This is a test I was running with centos 7, python 3.6.4, pip 21.0.1. This is the error I got:
ERROR: Command errored out with exit status 1:
command: /<...>/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/hroskes/pip-install-c3934bw0/dataclassy_6c903aa4d6c54dcaa99ef3be18dea4f8/setup.py'"'"'; __file__='"'"'/tmp/hroskes/pip-install-c3934bw0/dataclassy_6c903aa4d6c54dcaa99ef3be18dea4f8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/hroskes/pip-pip-egg-info-5co3psmq
cwd: /tmp/hroskes/pip-install-c3934bw0/dataclassy_6c903aa4d6c54dcaa99ef3be18dea4f8/
Complete output (7 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/hroskes/pip-install-c3934bw0/dataclassy_6c903aa4d6c54dcaa99ef3be18dea4f8/setup.py", line 12, in <module>
long_description=open('README.md').read(),
File "/<...>/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 115: ordinal not in range(128)
Bizarre. But good to fix. I wonder if this is due to locale.getpreferredencoding
, in which case open
being given utf-8
as the encoding explicitly would work. For now I decided two hyphens looked best as a replacement. Thanks for reporting.
on some platforms pip install fails otherwise when setup.py tries to read the README