Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable the error message (failed to execute script) obtained with pyinstaller

Hi how do I disable the error (failed to execute script) when i run a exe process created with pyintaller ? without fix the script , because the script works well

like image 260
M Smith Avatar asked May 16 '26 09:05

M Smith


1 Answers

"failed to execute script" says that your python program terminates with non-zero exit code by exception. Try this:

import sys
def my_except_hook(exctype, value, traceback):
    sys.exit(0)
    return
sys.excepthook = my_except_hook
like image 141
Tyris Avatar answered May 19 '26 01:05

Tyris