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 import error if note has no "updated" element #8

Merged
merged 2 commits into from
Feb 11, 2021

Conversation

mkorosec
Copy link
Contributor

I got the following error when executing evernote-to-sqlite enex evernote.db evernote.enex

... 
  File "evernote_to_sqlite/cli.py", line 31, in enex
    save_note(db, note)
  File "evernote_to_sqlite/utils.py", line 28, in save_note
    updated = note.find("updated").text
AttributeError: 'NoneType' object has no attribute 'text'

Seems that in some cases the updated element is not added to the note, this is a part of the problematic note:

<created>20201019T074518Z</created>
<note-attributes>
   <source>web.clip7</source>
   <source-application>webclipper.evernote</source-application>
</note-attributes>

@simonw simonw merged commit 1c8457d into dogsheep:main Feb 11, 2021
simonw added a commit that referenced this pull request Feb 11, 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

Successfully merging this pull request may close these issues.

None yet

2 participants