vzhd1701 / enex2notion

Import Evernote ENEX files to Notion
MIT License
424 stars 35 forks source link

In the middle of a note import i get NoneType object has no attribute 'get' and everything crashes #65

Closed anogues closed 1 year ago

anogues commented 1 year ago

Hi.

After two notebooks imported successfully and some notes of the current one i get one crashing which stops everything:

DEBUG: Creating new page for note '¿Están exentos los rendimientos del trabajo obtenidos en el extranjero? - Billage CRM' Traceback (most recent call last): File "C:\Python\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Python\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Python\Scripts\enex2notion.exe__main__.py", line 7, in File "C:\Python\lib\site-packages\enex2notion\cli.py", line 47, in main cli(sys.argv[1:]) File "C:\Python\lib\site-packages\enex2notion\cli.py", line 32, in cli _process_input(enex_uploader, args.enex_input) File "C:\Python\lib\site-packages\enex2notion\cli.py", line 40, in _process_input enex_uploader.upload_notebook(enex_file) File "C:\Python\lib\site-packages\enex2notion\cli_upload.py", line 55, in upload_notebook for note_idx, note in enumerate(iter_notes(enex_file), 1): File "C:\Python\lib\site-packages\enex2notion\enex_parser.py", line 27, in iter_notes yield from (_process_note(e) for e in iter_xml_elements_as_dict(enex_file, "note")) File "C:\Python\lib\site-packages\enex2notion\enex_parser.py", line 27, in yield from (_process_note(e) for e in iter_xml_elements_as_dict(enex_file, "note")) File "C:\Python\lib\site-packages\enex2notion\enex_parser.py", line 53, in _process_note resources=_parse_resources(note_raw), File "C:\Python\lib\site-packages\enex2notion\enex_parser.py", line 63, in _parse_resources return [_convert_resource(r) for r in note_resources] File "C:\Python\lib\site-packages\enex2notion\enex_parser.py", line 63, in return [_convert_resource(r) for r in note_resources] File "C:\Python\lib\site-packages\enex2notion\enex_parser.py", line 105, in _convert_resource if resource_raw.get("data", {}).get("#text"): AttributeError: 'NoneType' object has no attribute 'get'

Regards, Albert

vzhd1701 commented 1 year ago

Could you please share the note that is causing this crash?

ConnorCrwf commented 1 year ago

make sure you got the latest version @anogues