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

Attachment KeyError Issue (Including Patch) #4

Open
svandragt opened this issue Mar 9, 2021 · 0 comments
Open

Attachment KeyError Issue (Including Patch) #4

svandragt opened this issue Mar 9, 2021 · 0 comments

Comments

@svandragt
Copy link

svandragt commented Mar 9, 2021

Hello, thanks for writing Todoist Converter! I've used it to convert from Todoist to OmniFocus via Taskpaper and it's worked well!

I had some uncommon Todoist tasks that wouldn't convert using this tool because the attachment field had unexpected data in it. I suspect this is populated using the IOS share sheet from another app. This caused a KeyError meaning the output would skip any following task items.

I've enclosed a patch which passes when a KeyError occurs so that the task (and any following) are still exported, even though the attachment might be missing.

This is the error:

Traceback (most recent call last):
  File "/Users/sander/dev/_thirdparty/todoist-converter/.venv/bin/tdconv", line 11, in <module>
    load_entry_point('todoist-converter==1.0rc1', 'console_scripts', 'tdconv')()
  File "build/bdist.macosx-11.2-x86_64/egg/tdconv/tdconv.py", line 115, in main
  File "build/bdist.macosx-11.2-x86_64/egg/tdconv/tdconv.py", line 40, in convert
  File "build/bdist.macosx-11.2-x86_64/egg/tdconv/tdconv.py", line 70, in process_zip
  File "build/bdist.macosx-11.2-x86_64/egg/tdconv/taskpaper.py", line 26, in convert
  File "build/bdist.macosx-11.2-x86_64/egg/tdconv/common.py", line 66, in convert
  File "build/bdist.macosx-11.2-x86_64/egg/tdconv/note.py", line 24, in __init__
  File "build/bdist.macosx-11.2-x86_64/egg/tdconv/note.py", line 32, in _extract_content_and_attachment
KeyError: u'file_name'

Patch:
attachment-keyerror.patch.txt

@svandragt svandragt changed the title Attachment KeyError Issue Attachment KeyError Issue (Including Patch) Mar 9, 2021
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

1 participant