claytron / ever2simple

Migrate from evernote to simplenote with markdown formatting
176 stars 49 forks source link

TypeError: initial_value must be unicode or None, not str #1

Closed zhaocai closed 13 years ago

zhaocai commented 13 years ago

just installed using pip as instructed and tried with the following error.

ever2simple Notes.enex > simplenote.json Traceback (most recent call last): File "/usr/local/bin/ever2simple", line 8, in load_entry_point('ever2simple==1.0a1', 'console_scripts', 'ever2simple')() File "/Library/Python/2.7/site-packages/ever2simple/core.py", line 16, in main converter.convert() File "/Library/Python/2.7/site-packages/ever2simple/converter.py", line 73, in convert notes = self.prepare_notes(xml_tree) File "/Library/Python/2.7/site-packages/ever2simple/converter.py", line 43, in prepare_notes created_string = parse(note.xpath('created')[0].text) File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 698, in parse return DEFAULTPARSER.parse(timestr, _kwargs) File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 302, in parse res = self._parse(timestr, _kwargs) File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 350, in _parse l = _timelex.split(timestr) File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 144, in split return list(cls(s)) File "/Library/Python/2.7/site-packages/dateutil/parser.py", line 44, in init instream = StringIO(instream) TypeError: initial_value must be unicode or None, not str

claytron commented 13 years ago

I have not tested on Python2.7. Looking at the traceback it isn't clear to me why it would fail.

Could you provide me with some examples of the dates in the enex file?

zhaocai commented 13 years ago

I go to the python-dateutil website and find the problem.

The following files are available. python-dateutil-2.0.tar.gz (Python >= 3.0) python-dateutil-1.5.tar.gz (Python < 3.0)

pip installs the 2.0 version by default even for python 2.7. I works now after I install 1.5 version sudo pip install python-dateutil==1.5 Maybe you can put this in the readme

One more quick question: I am not familiar with json. Can ever2simple export markdown format directly?

claytron commented 13 years ago

I've not tested on Python 3 at all, so I'll need make sure the <2.0 version gets pulled down