Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commiting tasks to Todoist fails #32

Open
itsmegb opened this issue Jan 16, 2023 · 1 comment
Open

Commiting tasks to Todoist fails #32

itsmegb opened this issue Jan 16, 2023 · 1 comment

Comments

@itsmegb
Copy link

itsmegb commented Jan 16, 2023

When autodoist attempts to commit changes to Todoist, it fails with the error

2023-01-16 16:38:25 DEBUG    check_header: no right model found
Traceback (most recent call last):
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 1556, in <module>
    main()
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 1514, in main
    overview_task_ids, overview_task_labels = autodoist_magic(
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 1126, in autodoist_magic
    api = modify_task_headers(api, task, section_tasks, header_all_in_p,
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 754, in modify_task_headers
    api = commit_content_update(api, task.id, content)
  File "/Users/georgeboddey/Code/personal/autodoist/autodoist.py", line 468, in commit_content_update
    api.queue.append(data)
AttributeError: 'int' object has no attribute 'queue'

Looking at the code, it appears that the find_and_headerify_all_children function returns '0', instead of the api object, meaning we loose our connection to the Todoist API.

Updating the linked line to return api should fix the issue.

return 0

@Hoffelhas
Copy link
Owner

Ah good catch, thank you. Will patch this shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants