1

I have created a basic GUI using python tkinter. There is a tkcalender DateEntry widget. I created the executable using pyinstaller. If I remove the DateEntry widget, everything works fine. But if there is DateEntry Widget, I am getting 'fatal error detected'. failed to execute the script. Why is it happening? Is it because the DateEntry widget couldn't load date?

from tkinter import *
from tkcalendar import DateEntry

class MyClass:
    def __init__(self, master):
        self.master = master
        master.geometry("200x300")
        self.startBtn  = Button(master, text = "ok", command = self.okPress, width = 15)
        self.startBtn.grid(row=1, column=1, padx =50, pady= 50)

        self.dateEn = DateEntry(master)
        self.dateEn.grid(row =2, column = 1)

    def okPress(self):
        self.newWin = Toplevel(self.master)
        self.newWin.geometry("70x70")

        self.newLabel = Label(self.newWin, text= "hello world")
        self.newLabel.grid(row=3, column=1, padx =10, pady= 10)

root = Tk()
myObject = MyClass(root)
root.mainloop()
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
master_yoda
  • 463
  • 3
  • 11

0 Answers0