Python中tkinter莫名其妙报错
Exception in Tkinter callbackTraceback (most recent call last):
File "C:\\Users\\Charlie\\AppData\\Local\\Programs\\Python\\Python38\\lib\\tkinter\\__in
it__.py", line 1883, in __call__
return self.func(*args)
File "D:\\my.code\\小甲鱼.py", line 26, in sleep
imgLabel = Label(root, image=photo)
File "C:\\Users\\Charlie\\AppData\\Local\\Programs\\Python\\Python38\\lib\\tkinter\\__in
it__.py", line 3143, in __init__
Widget.__init__(self, master, 'label', cnf, kw)
File "C:\\Users\\Charlie\\AppData\\Local\\Programs\\Python\\Python38\\lib\\tkinter\\__in
it__.py", line 2567, in __init__
self.tk.call(
_tkinter.TclError: image "pyimage2" doesn't exist
发代码
发完整代码吧,你这里错误应该是代码中存在多个 Tk() 根窗口 ,或者 mainloop() 了
谢谢!问题已解决了
页:
[1]