Search code examples
pythonpython-3.xkivypyinstallerexe

Pyinstaller exe crash without any erorr message


I tried using pyinstaller few times and every time the exe file crashing after a second. By running my program py files via the cmd I never get any error at all.

PS P:\auto_task_final> pyinstaller -c -F --windowed .\MainScreen.py

117190 INFO: Appending archive to EXE P:\auto_task_final\dist\MainScreen.exe
147315 INFO: Building EXE from EXE-00.toc completed successfully.

Solution

  • I suspect the problem with the app crashing is that the pyinstaller module doesn't look for your .kv files by default, and that's usually the reason to why it crashes. There's a guide on how to include your kv files in your app bundle in the official kivy docs. And the reason to why you aren't getting any error message is that the error messages aren't printed out as pop up boxes or anything like that: it is still printed in the terminal/cmd prompt. But since you are using the --windowed argument here, the terminal window is disabled and that's why you don't get to see any error message.