lazy_import
lazy_import copied to clipboard
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 621: ordinal not in range(128)
Collecting lazy_import
Downloading https://files.pythonhosted.org/packages/44/2e/5378f9b9cbc893826c2ecb022646c97ece9efbaad351adf89425fff33990/lazy_import-0.2.2.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-084ivfpp/lazy-import/setup.py", line 6, in <module>
readme = infile.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 0xe2 in position 621: ordinal not in range(128)
On some systems pip install lazy_import
fails with the above error. I guess they're not defaulting to UTF-8 decoding.
Having the same issue, have anybody solved this one?
I solved it in the attached pull request. I'm pretty sure the CI failures on that are due to issues with the CI system rather than a fairly simple code change.
Thanks!
Just going to add what worked for me here:
curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | LC_ALL=C.UTF-8 xargs -n 1 -L 1 pip3 install
The difference is in the LC_ALL=C.UTF-8
part, which suppressed the error.
git clone https://github.com/mnmelo/lazy_import cd lazy_import
and open setup.py using any editor and change this line
with open('README.rst') as infile: readme = infile.read()
to
with open('README.rst', encoding='your encoding') as infile: readme = infile.read()
and pip install . (in lazy_import directory)
in my case your encoding = cp949
in your case this might be work... your encoding = ascii