Note: Not sure if this kind of question belongs here but as long as this won't fit anywhere else this site is the closest.

Back to the topic, I have a python file which I obfuscated it and anytime I want to turn this into executable using pyinstaller there's a 0x90 byte at the beginning of file which it can't be decoded using UTF-8. When I run the program it shows me this error:

Traceback (most recent call last):
  File "test.py", line 500, in <module>
  File "test.py", line 481, in djxvCOWAMQFNXLmkmwHopqHMWeJWqRRfaTYhtVQhEjhYQByjCUhjZmlyRVkSKqsEcxYRXketUHcQvObBfTQifGMfTOEsxpDzumWrevMKrXWYeXWOqinkNlbvZDoeaQMo
  File "test.py", line 236, in CjpiLgqGSPHXaLfOKvPztQfChQlzklDoKWuieQOqmnPEnVxqRophKppuTPUSrlAdiWNiSOwcKqyDZoQSJsvmVPUVLFIQvRZbwSFHZQdLkwgXSoPoFJbjsZnrLKWkjKnZ
  File "codecs.py", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 2: invalid start byte

Not sure how do I deal with this, I have tried different naming of variable and still the same thing. Can someone help me a bit with this? Thanks in advance!

  • Have you checked the file that causes the problem in a (hex) editor if it is really a python source file? Please post the first bytes of that file (best in hex). What obfuscator have you used?
    – Robert
    Mar 26, 2022 at 16:58
  • Yes, I used one online because New Hex Editor didn't display well the bytes. I used Intensio Obfuscator as an obfuscator. link this is a link to a screenshot I have captured because this online editor couldn't let me copy some hex bytes
    – RickyLo
    Mar 26, 2022 at 20:57
  • Apparently it was an encoding error on my file before obfuscating it. the question should be closed now.
    – RickyLo
    Mar 26, 2022 at 22:30
  • you can add an answer with the explanation and accept it
    – Igor Skochinsky
    Mar 27, 2022 at 16:33
  • ok sure I might do it because someone else might find it helpful
    – RickyLo
    Mar 27, 2022 at 18:27

1 Answer 1


These kinds of problems are related to the encoding of your script/program. My specific problem was related that 0x90 byte on my file was a latin character which UTF-8 couldn't recognize. On top of my file I wrote # -- coding: latin-1 -- and it was fixed. For anyone curios the little pest was this character È at byte 0x90.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.