AttributeError:'_tkinter.tkapp'对象没有属性'destoy

时间:2020-05-22 17:00:21

标签: python arrays tkinter python-imaging-library

我的项目错误显示退出按钮?我该怎么办...我检查了更多次

def iExit():
              iExit = tkinter.messagebox.askyesno("Customer Billing system","Confirm if you want to exit")
              if iExit > 0:
                   root.destoy()
                   return

错误。...

t__.py", line 2095, in __getattr__
    return getattr(self.tk, attr)
AttributeError: '_tkinter.tkapp' object has no attribute 'destoy'

1 个答案:

答案 0 :(得分:2)

这是语法错误。请检查破坏的拼写...

  After if `iExit > 0:` check this `root.destroy()`