diff --git a/evernote_to_sqlite/utils.py b/evernote_to_sqlite/utils.py index 164b8e7..398cba7 100644 --- a/evernote_to_sqlite/utils.py +++ b/evernote_to_sqlite/utils.py @@ -27,7 +27,11 @@ def find_all_tags(fp, tags, progress_callback=None): def save_note(db, note): title = note.find("title").text created = note.find("created").text - updated = note.find("updated").text + if note.find("updated") is not None: + updated = note.find("updated").text + else: + updated = created + # Some content has   which breaks the XML parser content_xml = resolve_entities(note.find("content").text.strip()) content = ET.tostring(ET.fromstring(content_xml)).decode("utf-8") row = {