Error When Using Pyinstaller: Unicodedecodeerror: 'utf-8' Codec Can't Decode Byte 0xff
Solution 1:
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.
Solution 2:
The answer still works 2 years later BUT the line changed from 368 to 428.
Solution 3:
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!
Solution 4:
Changing compat.py works for me: out = out.decode(encoding, "replace")
This is a known problem on pyinstaller and the developers are working on it. https://github.com/pyinstaller/pyinstaller/pull/3895
I hope this bug will solved on the next update.
Solution 5:
The error is fixed since Version 4.0
pip install "pyinstaller>=4.0.0"
Post a Comment for "Error When Using Pyinstaller: Unicodedecodeerror: 'utf-8' Codec Can't Decode Byte 0xff"