曲速飞跃 发表于 2020-12-5 19:08:54

彻底解决image "pyimage2" doesn't exist

Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\Charlie\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 1883, in __call__
    return self.func(*args)
File "D:\my.code\BookBook\BookBook.py", line 95, in look
    theLabel = tk.Label(look, image=photo)
File "C:\Users\Charlie\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 3143, in __init__
    Widget.__init__(self, master, 'label', cnf, kw)
File "C:\Users\Charlie\AppData\Local\Programs\Python\Python38\lib\tkinter\__init__.py", line 2567, in __init__
    self.tk.call(
_tkinter.TclError: image "pyimage2" doesn't exist

笨鸟学飞 发表于 2020-12-5 22:52:58

一个程序中只能存在一个根窗口,也就是说只能存在一个Tk(),其他的窗口只能以顶层窗口(Toplevel())的形式存在。
页: [1]
查看完整版本: 彻底解决image "pyimage2" doesn't exist