Reputation: 41
I'm having trouble changing exe name to other name except main, that is to say, EXE works well only when it's name is "main", is there any dependency about the exe name? my project named "studio" and I generate studio.exe in output directory, but I failed to run exe with the error following: output on console:
ValueError: non-hexadecimal number found in fromhex() arg at position 17
While I change name to "main", I don't have such error above. After tried many ways I can't figure out why, anyone perhaps have good idea? thanks
Upvotes: 3
Views: 5294
Reputation: 106608
Use the -n
/--name
option to specify the name of the executable when you run pyinstaller, rather than renaming the executable afterwards:
python pyinstaller.py --name=studio
You can refer to the discussion below for an in-depth analysis of the issue: https://github.com/pyinstaller/pyinstaller/issues/1106
Excerpt from codewarrior0's comments:
The above error is caused by the bootloader using the filename of its exe to derive the filename of the manifest to load using CreateActCtx. The error occurs because the application manifest is not found when the onefile exe is renamed.
Upvotes: 8