我想让标签出现和消失,但我遇到了grid_forget()
. 这是代码的一部分:
def creabackuno():
showinfo( "Wait..","I am creating the backup, please wait...")
vsl=Label(gui,text="Working, please wait...",font=("arial",16)).grid(row=20,rowspan=1,column=0,columnspan=1,padx=10,sticky=N)
try:
copytree(path,r"backup\dirbackup1\.minecraft")
showinfo( "OK!","Backup (1) created!")
vsl.grid_forget()
except OSError:
showerror( "Nope!","There is already a backup to restore")
vsl.grid_forget()
这是控制台的错误:
AttributeError: 'NoneType' object has no attribute 'grid_forget'