Error on converting
kidata opened this issue · comments
When i try this with Python 2.7.2 on Windows 7 64bit with a fresh exported .enex file:
ever2simple Evernote.enex -o simplenote -f dir
i get this error:
Traceback (most recent call last):
File "D:\tools\Python27\Scripts\ever2simple-script.py", line 9, in
load_entry_point('ever2simple==2.0', 'console_scripts', 'ever2simple')()
File "d:\tools\python27\lib\site-packages\ever2simple\core.py", line 21, in main
converter.convert()
File "d:\tools\python27\lib\site-packages\ever2simple\converter.py", line 80, in convert
notes = self.prepare_notes(xml_tree)
File "d:\tools\python27\lib\site-packages\ever2simple\converter.py", line 52, in prepare_notes
note_dict['createdate'] = created_string.strftime(self.date_fmt)
ValueError: Invalid format string
the format of the created-nodes is 20160324T131701Z in my enex file
Same error when trying to convert a recent exported file.
exact same for me, on python 2.7.6, win 7 64bit. I guess everyone is moving to simplenote after the announcement lol
hi, if you want to fix the date string error, just change line 16 in converter.py from
date_fmt = '%h %d %Y %H:%M:%S'
to
date_fmt = '%Y %m %d %H:%M:%S'
sorry still new to git and what the procedure is for submitting fixes
My date is also in this format: 20160629T084212Z. Maybe Evernote exports the date in different formats. Also not sure if this date is even kept anywhere in the text file, so I guess it really doesn't matter what the date is?
The problem is that %h
is not a valid python strftime(); %b
should be used instead.
It works on unix boxes (Linux, Mac,...) because python passes the string to strftime() from the C library which supports %h
as synonym for %b
Date actually matters if you want to keep your dates in Simplenote...
(Submitted Pull Request #10 with this small change)
@AmedeeBulle But the other fix suggested changes the order of the year and month. Does your solution fix this too?
Thanks
Fantastic. Thank you!
My first usage yesterday was a complete success, thanks in particular to @hxnhng for the comment about the date_fmt.
Now......since I just converted a few hundred notes, if only there were a way to automate the tagging. I guess there's nothing in simplenote that allows this in the note or filename, etc., right? The reason I ask is that I was planning to export by tag in evernote, so at import time I would know the tag to use for each note.
Tags should not be an issue if you go through the JSON path...
What I was missing was the Notebooks as this does no exist in Simplenote. So I exported by notebook and uploaded in Simplenote adding a tag for each notebook.
Thanks, will try JSON for the next batch.
Hi,
@AmedeeBulle how do you import the json into the simplenote?
Thanks
Just using the Simplenote API -- wrote a small script which reads back the JSON file and uploads to Simplenote.
I did that because:
- It works out of the box (no need to setup Dropbox synch or whatever)
- it preserves tags
- It preserves create/update dates
I can share the code if anybody is interested...
I can share the code if anybody is interested...
+1, thanks, your script (and ever2simple fork) worked perfectly for me.
I am too. Thanks!