rdb / toggl2moneybird

User-friendly command-line tool for synchronizing time entries from Toggl Track to Moneybird
MIT License
0 stars 0 forks source link

Error when syncing entries for an archived project #3

Closed sandord closed 3 months ago

sandord commented 3 months ago

First of all, thanks for writing this great tool!

Now, I encountered this error and found out I have entries for a project that has been archived.

sync.py:46 in add_tt_entry
assert tt_project['id'] == tt_project_id
TypeError: 'NoneType' object is not subscriptable

I'm not sure if this should be made possible, maybe an explanatory error would be sufficient?

rdb commented 3 months ago

Thanks for using it and giving feedback!

It looks like the Toggl Track API doesn't return projects that are archived by default. I can apparently add the ?include_archived=true argument to include them, which seems to fix the problem.

In my opinion, these entries should still be synced.

rdb commented 3 months ago

Version 0.4.1 is now deployed with the bug fix included.

sandord commented 3 months ago

Thanks!