Executable Closes After Opening

1,749 views
Skip to first unread message

Matthew Watts

unread,
Mar 17, 2011, 10:06:57 PM3/17/11
to PyInstaller
This is probably a really simple solution, but I've been trying for
the past two days to convert my Python application into a single
executable file using Pyinstaller 1.5 and 1.4, Py2exe, bbFreeze, etc.

I got the furthest with Pyinstaller.I kept getting the improper way to
call MS Visual Studio pop-up when I was using Python version 2.6 and
Pyinstaller 1.5. So, I ended up having to downgrade from Python 2.6 to
2.5 and iam using v1.4 of PyInstaller.

Since then, I compiled everything fine, no errors. I can open the
executable fine with a console and it closes right after. I can open
the executable with no console and nothing comes up, but you can see
the spinning wheel on the mouse for a second.

When I run the project via the __init__.py file in Eclipse it will
show my GUI application fine and stay open. I don't know what I'm
doing wrong, but I have tried everything; including adding a path to
Tkinter manually.

Any insight would be appreciated.

Martin Zibricky

unread,
Mar 27, 2011, 12:49:28 PM3/27/11
to pyins...@googlegroups.com
Matthew Watts píše v Čt 17. 03. 2011 v 19:06 -0700:

> Any insight would be appreciated.

Hi, could you please reduce your app to a minimal code example which is
failing and which you could post here?

Matthew Watts

unread,
Mar 27, 2011, 1:21:17 PM3/27/11
to pyins...@googlegroups.com
Hello Martin,

After I posted to the group, I found that it has to do with Tkinter exclusively. When I switched to using PyGTK for my GUI it would compile with no problems and worked for the single .exe. I managed to figure this out by screenshoting the console window quickly before it closed and it wasn't loading the MS Visual Studio files correctly.

It was giving me a weird import hook error (attached the screen shot) and after Googling a ton more, tracked it down to someone else mentioning that it wasn't importing an archive correctly. Since pyinstaller worked fine on python scripts before adding in a GUI, Tkinter was my culprit. I don't know why it wasn't loading in the required files, and am really just too tired to work on it anymore. I spent nearly 4 days solid the week I posted this question trying to get it too work.

Thanks for finally approving my question though, you have a solid product and I'm glad it's around. I just wish it worked better at packaging Tkinter and gave a more helpful error notice.

Matthew


--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To post to this group, send email to pyins...@googlegroups.com.
To unsubscribe from this group, send email to pyinstaller...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyinstaller?hl=en.


pyinstaller-tkinter-error.jpg
Reply all
Reply to author
Forward
0 new messages