I have simple program with only one function which process files and then converts to pdf on a press of button. initially GUI
window freezes while the function was running, after this I introduced threading into the program and now GUI
freezing issue was resolved, but now when press the button again it shows below error
if anyone can help me on how to fix this and also explain how it works, that will be really helpful, as I am new to python and just started using Tkinter
.
sample code would be even more helpful.
CodePudding user response:
You shouldn't use the old thread object you used on the first button click. Instantiate a new one instead.
This is because, you can't start the same thread twice.
So maybe keep a list of threads and add a new one with each button click.
CodePudding user response:
i have found the solution for my problem
TkInter disable buttons while thread is running by furas
Thank you all