I'm getting this error when pip-installing the library under python 3.7:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-n2291b7g/titlecase/setup.py", line 21, in <module>
version=read_version('titlecase/__init__.py'),
File "/tmp/pip-install-n2291b7g/titlecase/setup.py", line 13, in read_version
for line in read_file(rel_path).splitlines():
File "/tmp/pip-install-n2291b7g/titlecase/setup.py", line 10, in read_file
return 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 0xe2 in position 521: ordinal not in range(128)
Looking at the code at setup.py, it appears that read_version() uses read_file() to read titlecase/__init__.py.
However this init file is utf-8 encoded, and thus the open() call (that uses text mode by default) fails to decode as ascii is assumed.
This appears to have been introduced in the latest release, as it was working (for us) flawlessly before.
I'm getting this error when pip-installing the library under python 3.7:
Looking at the code at
setup.py
, it appears thatread_version()
usesread_file()
to readtitlecase/__init__.py
. However this init file is utf-8 encoded, and thus theopen()
call (that uses text mode by default) fails to decode as ascii is assumed.This appears to have been introduced in the latest release, as it was working (for us) flawlessly before.
Thanks! Yonatan