Tkinter error: _tkinter.TclError: unknown option "-menu" Tkinter error: _tkinter.TclError: unknown option "-menu" tkinter tkinter

Tkinter error: _tkinter.TclError: unknown option "-menu"


Agree the error message is confusing. Anyway, there's a couple of errors in your code — fixed and noted in comments in the code below:

import tkinter as tkG_FONT=("Verdana", 12)class CapApp(tk.Tk):    def __init__(self, *args, **kwargs):        tk.Tk.__init__(self, *args, **kwargs)        container = tk.Frame(self)        container.pack(side="top", fill="both", expand=True)        container.grid_rowconfigure(0, weight=1)        container.grid_columnconfigure(0, weight=1)        self.frames = {}        frame = StartPage(container, self)        self.frames[StartPage] = frame        frame.grid(row=0, column=0, sticky="nsew")        self.show_frame(StartPage)    # Fixed indentation so function is a class method.    def show_frame(self, cont):        frame = self.frames[cont]        frame.tkraise()class StartPage(tk.Frame):    def __init__(self, parent, controller):        # You're passing too many arguments the base class __init__()#        tk.Frame.__init__(self, parent, controller)1        tk.Frame.__init__(self, parent)        label = tk.Label(self, text="Start Page", font=G_FONT)        label.pack(pady=10, padx=10)if __name__ == "__main__":    app = CapApp()    app.mainloop()