Tkinter Create Image Function Error (pyimage1 Does Not Exist)
I'm a student from the outside world with no previous programming experience. I have been learning Python as an extension of my math class. I have been trying to create a program t
Solution 1:
Have a try and define a master:
PhotoImage(master = canvas, width = WIDTH, height = HEIGHT)
If you do not define a master then this image uses the first Tk()
which is created and if that Tk
is deleted there is no image to display.
Tell me if it works, I am guessing.
Solution 2:
Okay, I thanks for the input, people! I managed to fix it by changing the window = Tk()
into window = Toplevel
and replacing anchor = tkinter.NW
to anchor = NW
. Now it runs exactly how I intended it. On to finish the input GUI! :D
Post a Comment for "Tkinter Create Image Function Error (pyimage1 Does Not Exist)"