Jul-06-2022, 01:54 PM
(Jul-06-2022, 01:12 PM)deanhystad Wrote: You need a periodic event. In tkinter you could use .after() to call a function.
def update_phase(): with open('number.json', 'r') as f: distros_dict = json.load(f) for distro in distros_dict: op = json.dumps(distro["text"]) str = path+op+".png" # Open file and update image # Repeat in an hour 3,600,000 milliseconds root.after(3600000, update_phase)
Thanks. But I now get this error:
Error:AttributeError: type object 'str' has no attribute 'read'
I'm trying to figure out what it means.