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

Fix key error issue #3

Open
programmerPhysicist opened this issue Dec 28, 2023 · 1 comment
Open

Fix key error issue #3

programmerPhysicist opened this issue Dec 28, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@programmerPhysicist
Copy link
Owner

Sometimes, when running the script, you will get the following error:

Traceback (most recent call last):
  File "/home/user/Workspace/habitica-workspace/Habitica-Plus-Todoist/source/oneWaySync.py", line 223, in <module>
    sync_todoist_to_habitica()
  File "/home/user/Workspace/habitica-workspace/Habitica-Plus-Todoist/source/oneWaySync.py", line 119, in sync_todoist_to_habitica
    fin_hab = main.get_hab_fromID(tid)
  File "/home/user/Workspace/habitica-workspace/Habitica-Plus-Todoist/source/main.py", line 228, in get_hab_fromID
    hab = HabTask(task['data'])
KeyError: 'data'
@programmerPhysicist programmerPhysicist added the bug Something isn't working label Dec 28, 2023
@programmerPhysicist
Copy link
Owner Author

programmerPhysicist commented Dec 29, 2023

This issue is related to a TODO in the code:
# TODO: handle error cases for response
We need to do what is said in the TODO to at least partially fix the issue. The other thing that needs to happen, is we need to stay within the rate limit of Habitica: #6

@programmerPhysicist programmerPhysicist self-assigned this Dec 29, 2023
programmerPhysicist added a commit that referenced this issue Jul 30, 2024
    - Get completed tasks in Todoist to be completed in Habitica. Clean up.
    - Modify code to work better for testing.
    - Fix issue with date not syncing. Also partially fix #3 issue.
    - Improve error handling. Add sleep for rate limiting.
    - Do some clean-up.
    - Add check for data dumped to pickle file.
programmerPhysicist added a commit that referenced this issue Jul 30, 2024
    - Get completed tasks in Todoist to be completed in Habitica. Clean up.
    - Modify code to work better for testing.
    - Fix issue with date not syncing. Also partially fix #3 issue.
    - Improve error handling. Add sleep for rate limiting.
    - Do some clean-up.
    - Add check for data dumped to pickle file.
programmerPhysicist added a commit that referenced this issue Nov 3, 2024
    - Get completed tasks in Todoist to be completed in Habitica. Clean up.
    - Modify code to work better for testing.
    - Fix issue with date not syncing. Also partially fix #3 issue.
    - Improve error handling. Add sleep for rate limiting.
    - Do some clean-up.
    - Add check for data dumped to pickle file.
programmerPhysicist added a commit that referenced this issue Nov 3, 2024
    - Get completed tasks in Todoist to be completed in Habitica. Clean up.
    - Modify code to work better for testing.
    - Fix issue with date not syncing. Also partially fix #3 issue.
    - Improve error handling. Add sleep for rate limiting.
    - Clean-up code and warnings.
    - Add check for data dumped to pickle file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant