Python Forum
Pyinstaller keeps thread running
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pyinstaller keeps thread running
#1
Hello all . . .

Can anyone help with a Pyinstaller question?

I've built a Tkinter executable with Pyinstaller - it works fine ( apart from being 20MB in size from a 10KB source . . .)
But . . . When the user closes the window to exit the progam it keeps running in the background - two instances in fact as can be found in Windows Task Manager

I've tried every combination of exit() sye.exit() etc etc but no luck.
Is there a simple fix I can build into my code?
Many Thanks for any info
Reply
#2
This sounds like problem with your Tkinter code, not pyinstaller
Post your python code in python tags. Also if you have edited your .spec file - post it
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
The Tkinter section of the program ends with root.mainloop() - without which it causes all kinds of problems in the IDE which I use i.e. Thonny.

Running my prog direct from Python, or within Thonny, all is well.
But the Pysinsaller generated .exe file keeps those (hidden) threads still running.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to not terminate a running thread in python Contra_Boy 3 1,994 May-05-2020, 09:38 PM
Last Post: SheeppOSU
  Error SQLite objects created in a thread can only be used in that same thread. binhduonggttn 3 15,601 Jan-31-2020, 11:08 AM
Last Post: DeaD_EyE
  Problems running exe file from pyinstaller ersa21 4 7,867 Jan-15-2019, 06:36 PM
Last Post: snippsat
  Is thread running? MuntyScruntfundle 0 2,092 Oct-19-2018, 06:10 PM
Last Post: MuntyScruntfundle

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020