Why photoimages don't exist?

后端 未结 1 349
予麋鹿
予麋鹿 2020-12-18 11:17

I will show a reduced portion of the code that gives me a problem.

_tkinter.TclError: image \"pyimageN\" doesn\'t exist - where N stays for 1, 2, 3, etc

相关标签:
1条回答
  • 2020-12-18 11:39

    I solved myself the problem :

    The second class I defined was the problem cause it used another root window, alias Tk(). An equivalent to the normal Tk() window is the Toplevel() that is the same as a root but hasn't its own interpreter context.

    Shortly, to solve the problem I had to change the first line of the init() method of the EditorWindow class from

            self.Eenu=Tk()
    

    to

            self.Eenu=Toplevel() 
    
    0 讨论(0)
提交回复
热议问题