andreas-vester / notestation-to-joplin

Imports Synology Note Station notes into Joplin
GNU General Public License v3.0
20 stars 7 forks source link

Parsing NSX file error #3

Open Antergosgeek opened 3 years ago

Antergosgeek commented 3 years ago

Starts out fine but after reading a couple of notes I get the following error: Traceback (most recent call last): File "nsx2joplin.py", line 459, in <module> nsx_content = nsx.extract_data_from_nsx(nsx_file=nsx_file, save_pickle=False) File "nsx2joplin.py", line 249, in extract_data_from_nsx for attachment in note_data["attachment"]: TypeError: 'NoneType' object is not iterable

Unfortunately since I am not a huge programmer and not very experienced with python I don’t know how to fix this. Can you provide help? I would really like to move to Joplin but can’t do it if I can’t get this to work. I tried Note station to Markdown but that breaks all attachment links for me and isn’t really an option.

Antergosgeek commented 3 years ago

No one?

exfounder commented 1 year ago

I found the same problem and do not know how can I fix it.

paluigi commented 1 year ago

I fixed this error by changing line 247 and checking if node_data["attachment"]is None in the following way: if "attachment" in note_data and note_data["attachment"] is not None:

Note that I have another error afterwards (the same as #1 ), so this fix only bring me that far...