Re: Strange encoding problem in setup.py of biopython 1.71
[Andreas Tille, 2018-04-05]
> Traceback (most recent call last):
> File "setup.py", line 435, in <module>
> readme_rst = handle.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 7116: ordinal not in range(128)
> E: pybuild pybuild:336: clean: plugin distutils failed with: exit code=1: python3.6 setup.py clean
> dh_auto_clean: pybuild --clean -i python{version} -p 3.6 returned exit code 13
> ...
in setup.py, if you decide to keep supporting Python 2, change lines 434-435 into:
with open("README.rst", 'rb') as handle:
readme_rst = handle.read().decode('UTF-8')
or if you finally let it go, change only line 434:
with open("README.rst", encoding='UTF-8') as handle:
--
GPG: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
Reply to: