cached-property
cached-property copied to clipboard
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 561: ordinal not in range(128)
Building with python3.4 on Debian:
I: pybuild base:170: python3.4 setup.py clean
Traceback (most recent call last):
File "setup.py", line 15, in
Sounds like you need to set your system LOCALE to UTF-8 or they need to manually specify a locale when opening the docs.
I've recently seen this error a bunch with tests running under Tox. Tox 2 sanitizes the environment, including the LOCALE
, so Python 3 can't properly guess the environment's encoding.
The solution I've used in my projects is to do open(fn, 'rb').read().decode('utf-8')
instead of just open(fn).read()
.
A similar issue occurred with cookiecutter last week: https://github.com/audreyr/cookiecutter/pull/453