Scheduled a variable to be updated with the current time for display in a label.
Exception in Tkinter callback
Did some testing though, and I can't find this exact problem elsewhere, but I did see something about it being a possible problem with class inheritance? I really don't know, very new to this.
Thanks in advance <3
[edit] currently reading this: http://effbot.org/tkinterbook/variable.htm which seems to be getting somewhere.
[edit 2] nope lol. still looking.
... def update_clock(): tab1_labeltxt = StringVar(time.strftime('%H %M %S')) brass_io.after(1000, update_clock) brass_io.after(1000, update_clock) brass_io.mainloop()Program works just fine without the above code, which produces this error:
Exception in Tkinter callback
Error:Traceback (most recent call last):
File "/usr/lib/python3.6/tkinter/__init__.py", line 1705, in __call__
return self.func(*args)
File "/usr/lib/python3.6/tkinter/__init__.py", line 749, in callit
func(*args)
File ".../BIBO_Project.py", line 100, in update_clock
tab1_labeltxt = StringVar(time.strftime('%H %M %S'))
File "/usr/lib/python3.6/tkinter/__init__.py", line 480, in __init__
Variable.__init__(self, master, value, name)
File "/usr/lib/python3.6/tkinter/__init__.py", line 317, in __init__
self._root = master._root()
AttributeError: 'str' object has no attribute '_root'
Not sure what to do. Above my pay-grade.Did some testing though, and I can't find this exact problem elsewhere, but I did see something about it being a possible problem with class inheritance? I really don't know, very new to this.
Thanks in advance <3
[edit] currently reading this: http://effbot.org/tkinterbook/variable.htm which seems to be getting somewhere.
[edit 2] nope lol. still looking.