Legacy 3.6 branch UnicodeDecodeError during installation
braun-steven opened this issue · comments
When running python setup.py install
on the legacy_3.6
branch, I'm getting:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-pv1d_p_r/e2cnn/setup.py", line 19, in <module>
long_description = f.read()
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 6561: ordinal not in range(128)
If I hotfix this by setting long_description = ""
, the installation works.
(Python 3.6.9)
Hi @Steven-LANG
Unfortunately, I am not able to reproduce this issue..
I am trying to install the legacy version with
pip install git+https://github.com/QUVA-Lab/e2cnn@legacy_py3.6
and I am using pip 20.2.2
.
I guess the problem is that long_description
contains the source of the file README.md, which might have some special characters.
I found a similar problem (and a possible solution) here: https://github.com/facebookresearch/fastText/pull/834/files
They just explicitly add encoding='utf-8'
when loading the README file.
However, since I can not reproduce this issue on my machines, I also can not check if this solves the problem.
Would you mind trying it on you machine?
Please, let me know if this solves your problem :)
Gabriele
Sorry, I should have posted the complete environment that I was testing it in. I tried to reproduce it on different machines now with no success.
I was using the nvidia docker cuda-10.1-cudnn7-devel image (ubuntu 18.04 as base) from which the above-mentioned error occurred.
Setting encoding='utf-8'
in fact solves the issue.
I'm not sure why this specific setup causes the issue in the first place but it might be a good idea to set it to utf-8
as default for compatibility reasons.