RuntimeError('main thread is not in main loop', ) after terminating a multithread program

Hi:

I have a multithread program. One of the thread is using MPL to plot
some data. Everything works as expected, until the moment I terminate
the program. When the main thread terminate, I start getting this
message:

Exception exceptions.RuntimeError: RuntimeError('main thread is not in
main loop',) in <bound method PhotoImage.__del__ of
<Tkinter.PhotoImage instance at 0x910064c>> ignored

I get 8 of this message, and then the program finally stop.

I am stopping the thread before terminating. I also close the figure.
All the threads are running as Daemons
(thread_instance.setDaemon(True) ).

Any idea about what could be happening?

Regards,
Alejandro.

1 Like