I was trying to code a small window in a program that is giving you feedback about your statistics in the game. The output is working fine, but the image i tried to edit is not working. I tried to define the image global, i tried to take the direct path, i tried to change the suffix of the picture i want to edit (right now it's a .gif -file) but nothing is working. Whats wrong? What is my mistake?
import tkinter
def blackhole():
Black=tkinter.Tk()
Black.title("BlackHole")
schrift=tkinter.Label(Black,text="BlackHole: Game got reseted!")
schrift.pack()
Medal=tkinter.Label(Black,text="Congretulation! You earn the Bronze Medal!")
Medal.pack()
knopf=tkinter.Button(Black,text="Ok",command=submit)
knopf.pack()
canvas = tkinter.Canvas(Black, width=250, height=250)
canvas.pack()
tk_img = tkinter.PhotoImage(file = '/Users/Hannes/Desktop/Klickbot/b.gif')
canvas.create_image(150, 150, image=tk_img)