Skip to content Skip to sidebar Skip to footer

Tkinter Error On Python 3 (runtimeerror: Calling Tcl From Different Appartment)

The below code doesn't work on python3.5 (RuntimeError: Calling Tcl from different appartment) But It works well on python 2.7 It is hard to know the reason of problem and how can

Solution 1:

You must only access tkinter from a single thread, specifically the main thread (unless you are really very brave indeed). All other threads need to send messages to the main thread when they want GUI updates to happen; there's lots of mechanisms for sending messages between threads.

The threading rule is that way because of the underlying library's extensive use of thread-specific data (in order to avoid needing something like a global interpreter lock). You really can't update the GUI from another thread; the system will definitely blow up when you try to do so.

Post a Comment for "Tkinter Error On Python 3 (runtimeerror: Calling Tcl From Different Appartment)"