Error when using pyinstaller: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff
I found an answer on another forum.
I change the line number 369 in the Python\Lib\site-packages\Pyinstaller\compat.py
file:
out = out.decode(encoding)
to
out = out.decode(encoding, errors='ignore')
or
out = out.decode(encoding, "replace")
Now I can compile my script without any issue. I still don't know why my issue happened in the first place but at least that compiles now.
The answer still works 2 years later BUT the line changed from 368 to 428.
In the newest version (3.5) , the line moved slightly to 427.
The best thing to do is to search for
out = out.decode(encoding)
and replace it with
out = out.decode(encoding, "replace")
I don't understand why they do not fix this annoying problem!