Windows package generated by PyInstaller and .exe file is instantly closing ,

27 views
Skip to first unread message

Toon to Tech

unread,
Jul 11, 2020, 7:32:50 AM7/11/20
to PyInstaller
I actually had a project somewhat relevant to image comparison. I provided interfacing with kivy . The interface is working fine along with some error and some warning in logs. I had no idea how to fix them. This is one of the issues. The .exe file generated is instantly closing when opened. I had recorded the steps I done with it in a video. Here is the Link .
 I had attached all relevant documents including logs, messages shown in console, source code, and so on in this google drive .rar file. Here is that link . I am requesting you to help me get out of this issues especially the closing problem of .exe file.

bwoodsend

unread,
Jul 11, 2020, 9:27:41 AM7/11/20
to PyInstaller
Well you're current build in your second link is failing due to the [pkg_resources hidden module](http://pyinstaller.47505.x6.nabble.com/ModuleNotFoundError-No-module-named-pkg-resources-py2-warn-td2779.html) which you can fix by adding `"pkg_resources. py2_warn"` to the `hiddden_imports=[]` list in the spec file. You can run your exe from cmd (just `dist\ImageComparison\ImageComparison.exe`) which will allow you to see the error message and track down the issue if your program closes instantly.

I can't build your project because I don't have this `kivy_deps`module. I take it that this is a module you wrote but didn't put in the rar?

Toon to Tech

unread,
Jul 13, 2020, 3:22:28 AM7/13/20
to PyInstaller
Thank you sir. I run the program in cmd. It is due to some module error. I just included it in hidden imports in .spec file. Its working great . Thanks again ....

Joseph Sevita

unread,
Jul 13, 2020, 3:22:31 AM7/13/20
to PyInstaller
I got rid of this error using the latest "dev" version.
Reply all
Reply to author
Forward
0 new messages