CustomTkinter
CustomTkinter copied to clipboard
Invalid command name
invalid command name "1806550247616update" while executing "1806550247616update" ("after" script) invalid command name "1806550247232check_dpi_scaling" while executing "1806550247232check_dpi_scaling" ("after" script)
self.win = customtkinter.CTk()
When generating a new window immediately after closing the previous one, the above message is generated on the console but the code works fine without any error can you please solve this as some people consider it as an error
Description:
This is caused because the window is instantiated to be looped after the initial window has been destroyed. Something like this:
window.destroy()
anotherwindow.mainloop()
Solution:
To avoid this you can make use of CTkTopLevel
or create multiple CTkFrame
widgets instead of windows and move back and fourth in them.
If this answers your question mark it as solved!
Exception ignored in: <function Variable.del at 0x0000017B96258A60> Traceback (most recent call last): File "AppData\Local\Programs\Python\Python39\lib\tkinter_init_.py", line 363, in del if self._tk.getboolean(self._tk.call("info", "exists", self._name)): RuntimeError: main thread is not in main loop
I am getting this message in the console but the application still works fine but if the message comes more then 8-10 times then the application crashes
Did you try my solution?
Yes that issue is resolved now, in my application I have a popup window that works as a preloader when different functions been called that time I'm getting the above message
instead of destroying the window withdraw it first and after the other window is loaded destroy it
can you somehow give a minimal reproducible code