Python Forum
"tkinter.TclError: NULL main window"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"tkinter.TclError: NULL main window"
#2
You cannot call Tk() twice. If you need two windows use TopLevel() to make the second window. Tk() doesn't just make a window, it also does a bunch of initialization that is only supposed to happen once.
Reply


Messages In This Thread
"tkinter.TclError: NULL main window" - by Rama02 - Feb-04-2021, 05:44 PM
RE: "tkinter.TclError: NULL main window" - by deanhystad - Feb-04-2021, 06:45 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 544 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  Tkinter multiple windows in the same window tomro91 1 872 Oct-30-2023, 02:59 PM
Last Post: Larz60+
Exclamation [Tkinter] Error when closing the main window with destroy TomasSanchexx 1 798 Aug-06-2023, 01:54 AM
Last Post: deanhystad
  Centering and adding a push button to a grid window, TKinter Edward_ 15 4,917 May-25-2023, 07:37 PM
Last Post: deanhystad
  tkinter.TclError: can't invoke "canvas" command cybertooth 8 6,054 Feb-23-2023, 06:58 PM
Last Post: deanhystad
  [Tkinter] tkinter.TclError: expected integer but got " " TWB 2 3,748 Feb-19-2023, 05:11 PM
Last Post: TWB
  [Tkinter] Open tkinter colorchooser at toplevel (so I can select/focus on either window) tabreturn 4 1,931 Jul-06-2022, 01:03 PM
Last Post: deanhystad
  [Tkinter] Background inactivity timer when tkinter window is not active DBox 4 2,948 Apr-16-2022, 04:04 PM
Last Post: DBox
  why my list changes to a string as I move to another window in tkinter? pymn 4 2,586 Feb-17-2022, 07:02 AM
Last Post: pymn
  main lop in python tkinter barryjo 6 5,459 Jan-24-2022, 03:09 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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