Pyinstaller exe doesn't work

Hi, i made program and made GUI for it(with ttkbootstrap). Now i want to turn it into exe file
I decided to use pyinstaller and successefully made it, now i’m trying to open my exe file called LightProgram in the dist folder, black console opens and merely immediately closes. What’s happening? Do you know how to fix it or why it’s happening?

Have you tried a web search for “ttkbootstrap pyinstaller”?
I see a number of results that may be of help to you, depending on the exact errors you are getting.

Suggest you start with a small program that you turn into an EXE first.
A “hello world” GUI for example.

You can post the code of your small program here if you cannot make it work with pyinstaller here for us to comment on. Also include the commands you use to build the EXE. And include the errors you see.

1 Like

Try to run the program from the command line instead of double-clicking it. Then the window will stay open, so you can see whatever error is occurring on startup.

2 Likes

Thank you all, it turned out that i should create “savedData.txt” because my program requiered it actually, but i thought that pyinstaller will include it. Thanks to your suggestion, i understood the error, created file and now it works great. Have a good code :wink:

Perhaps it would be better to fix the code so that it handles that problem? After all, the user might mistakenly delete that file, thinking that the program could regenerate it. Many programs do offer that functionality.

2 Likes