Try using global in function. See if that fixes the problem.
Never Mine. It happening when you close game. It making a call after you destroy canvas.
Don't use time.sleep.
tkinter has there own. Every widget has .after.
def somefunction(): global a
Never Mine. It happening when you close game. It making a call after you destroy canvas.
Don't use time.sleep.
tkinter has there own. Every widget has .after.
def loop(): # roughly 30 frames per second a.after(1000/30, loop) # timer_id = a.after(1000/30, loop, loop args)Sample here
99 percent of computer problems exists between chair and keyboard.