My tkinter countdown function's custom parameters won't work; says it's missing required positional arguments My tkinter countdown function's custom parameters won't work; says it's missing required positional arguments tkinter tkinter

My tkinter countdown function's custom parameters won't work; says it's missing required positional arguments


In version 3 of the countdown() function you do a label.after(1000, countdown, seconds-1) which schedules it to be called again in 1000 milliseconds and passed one parameter with the value seconds-1. However you need to pass it all the arguments each time and you can do that by putting them in a tuple — so you need to do something along these lines:

label.after(1000, countdown, (label, nextframe, timertext, seconds-1))

(I don't really know what values you want to pass on subsequent calls, this above is just to give you the general idea.)

Here's some documentation of the after() method — note the last parameter is *args which indicates it should be some kind of a sequence such as a list or tuple.