_tkinter.TclError: image “…” doesn’t exist

You should use PhotoImage instance as image value. Also, you need to keep the reference of your image.

im = Image.open(pathToImage)
ph = ImageTk.PhotoImage(im)

label = Label(window, image=ph)
label.image=ph  #need to keep the reference of your image to avoid garbage collection

Leave a Comment