j4321 / tkcalendar

Calendar widget for Tkinter
https://pypi.python.org/pypi/tkcalendar
GNU General Public License v3.0
97 stars 33 forks source link

Exception after creating Calendar Widget on Raspberry Pi #84

Open DiesesFloo opened 2 years ago

DiesesFloo commented 2 years ago

Platform: Raspberry Pi 3B OS: Raspbian Bullseye Python Version: 3.9 TKCalendar Version: 1.6.1

Hey, I'm getting a exception, while creating my Calendar Widget. The program is working on PC but on Raspberry following exception is showing up in console: Tk.TCL_Error: Bad Window Path name "Calendar.calendar" at 0x025372

That's the code of the window-creation method:


    def createCalendarWindow(self):
        print("creating calendar")
        self.today = date.today()
        self.tomorrow = date.today() + datetime.timedelta(days=1)
        self.currentWindow = self.calendarWindow
        self.buttonBack.config(state = NORMAL)

        self.cal = Calendar(master=self.root)
        self.window.create_window(240, 200, window=self.cal)

        self.selectEventLabel = Label(self.root)
        self.window.create_window(570, 150, window=self.selectEventLabel)

        self.eventEntry = Entry(self.root)
        self.window.create_window(570, 200, window=self.eventEntry)

        self.saveEventButton = Button(self.root, text="Termin speichern", command=self.saveEvent)
        self.window.create_window(500, 250, window=self.saveEventButton)

        self.getEventButton = Button(self.root, text="Termin abfragen", command=self.setEventLabel)
        self.window.create_window(650, 250, window=self.getEventButton)

        self.todayEvent = Label(self.root)
        self.window.create_window(240, 320, window=self.todayEvent)

        self.tomorrowEvent = Label(self.root)
        self.window.create_window(240, 340, window=self.tomorrowEvent)

        self.clock = Label(self.root, font=("Arial", 30))
        self.window.create_window(400, 35, window=self.clock)

        print("created calendar")