@Skaperen
You have posted different error about this before.
From a clean Mint 18.1 install.
>>> print(repr(chr(255))) Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 1: ordinal not in range(128) >>> a=repr(chr(255))Your shell still has
ascii
as encoding.You have posted different error about this before.
From a clean Mint 18.1 install.
mint@mint ~ $ echo $LANG en_US.UTF-8 mint@mint ~ $ python3 -c"import sys; print(sys.stdout.encoding)" UTF-8
mint@mint ~ $ python3 Python 3.5.2 (default, Nov 17 2016, 17:05:23) [GCC 5.4.0 20160609] on linux >>> import sys >>> sys.stdout.encoding 'UTF-8' >>> print(repr(chr(255))) 'ÿ' >>> # To make your error i have to encode to ascii >>> a = repr(chr(255)) >>> a.encode('ascii') Traceback (most recent call last): File "<stdin>", line 1, in <module> UnicodeEncodeError: 'ascii' codec can't encode character '\xff' in position 1: ordinal not in range(128)