Skip to content
Advertisement

Why does it say “TypeError: ‘Label’ object is not callable”?

I am making a digital clock python program and don’t know why it says “TypeError: ‘Label’ object is not callable” for line:

JavaScript

I watched a yt video, that’s where I got the code. The guy there didn’t have a problem, but I do. I checked the answer of someone else in stack overflow, they said to not name our variable “Label” because there might be an error, however I haven’t.

JavaScript

Advertisement

Answer

digital_clock_lbl(1000, update_clock) doesn’t make sense. I guess you were trying to making a live clock, so I think you need to use .after method – window.after(1000,update_clock)

Try this –

JavaScript

Also, you have a typo in last line – window.mainLoop should be lowercase window.mainloop()

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement