tkinter.TclError: image “pyimage3” doesn't exist

后端 未结 4 465
陌清茗
陌清茗 2020-11-27 06:41

I\'m having trouble with a function that shows an image for two seconds on screen, and then is destroyed. When the program runs the functions initial call procedurely works

4条回答
  •  旧时难觅i
    2020-11-27 06:58

    The PhotoImage method creates an image for the first TK () instance created. Thus, it seems to have solved to inherit TK () instance by replacing TopLevel ().

    This can be solved by specifying the master of the Tk () instance as the option of PhotoImage.

    I think this should be changed.:

    splsh_img = tkinter.PhotoImage(file=file,master=wlcm_scrn)
    

提交回复
热议问题