Everything works perfect for a couple hours an then i'll get this error, an it will stop running.
todolist_items = len(todoalso)
UnboundLocalError: local variable 'todoalso' referenced before assignment
I think this is the section Im having trouble with but I dont understand why.
response = requests.get("https://beta.todoist.com/API/v8/tasks", params={"token":todoist_TOKEN})
if response.status_code == 200:
todoalso = response.json()
global todolist_items
todolist_items = len(todoalso)