一、问题
在进行tkinter点击按钮弹出新的界面的时候遇到了下面的问题:
【_tkinter.TclError: image "pyimage2" doesn't exist】

原因是因为这个photoimage只能加载一次,不能再次使用,因此需要的使用另外一种方式来完成界面的跳转。

二、解决
在跳转的界面使用tk.Toplevel()就可以完成界面的跳转

三、结果


四、总结
附上stackflow博主的地址:https://stackoverflow.com/questions/26097811/image-pyimage2-doesnt-exist
问题解答地址:https://stackoverflow.com/questions/20251161/tkinter-tclerror-image-pyimage3-doesnt-exist

posted on 2019-05-27 19:27  蔚蓝色の天空  阅读(2274)  评论(0编辑  收藏  举报