Search code examples
pythonpyarmor

PyArmor ERROR 'utf-8' codec can't decode byte 0x83 in position 594: invalid start byte


I am developing with Python, and tried to make an installer by typing the following command in PyArmor.

pyarmor pack -e " --onedir --noconsole --icon icon.ico -n testApp" main.py

Then I got the following error.

ERROR    'utf-8' codec can't decode byte 0x83 in position 594: invalid start byte

There is no error when I type and execute python main.py.

An error occurs only when PyArmor is running.

What is the cause? How can I fix it?


Solution

  • I don't know why, but changing the script execution folder solved the problem.

    If I put main.py in C: \ Users \ username \ Documents \ testApp folder and cd C: \ Users \ username \ Documents \ testApp, then I get an error.

    However, when I put main.py in C: \ Users \ username \ Desktop \ testApp folder and cd C: \ Users \ username \ Desktop \ testApp, the error disappeared.

    It is very strange.