Me Again

Feb 24, 2013 at 7:17 AM
I am the guy who sent discussion in the past. I am the guy who found that python 27 will not work but pytrhon 26 does.

I hgot your system to work. Then I stoipped as my WCE PDA was working fine.

Now it does not and I have an Android device which can use EDvernote.

I have too many notes to copy and paste so must get your program to work.

I am getting an error:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Edward Morgan>cd c:\python26

C:\Python26>python.exe converter.py coffee.csv N N N
Number of args = 5
0:converter.py
1:coffee.csv
2:N
3:N
4:N
Traceback (most recent call last):
File "converter.py", line 85, in <module>
YNPhatPriority = sys.argv[5]
IndexError: list index out of range

C:\Python26>

I am trying to convert a database called coffee that I have exported as coffee.csv and it is in the python26 directory.

I am running from that directory

python.exe converter.py coffee.csv N N N

What am i DOING WRONG?
Feb 24, 2013 at 8:09 AM
I know versions of Python make a difference so I downloaded python 2.6.5

I got a different error when running the same file. I would send you the file, but I guess I need an email address.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Edward Morgan>cd c:\python26

C:\Python26>python.exe converter.py coffee.csv N N N
Number of args = 5
0:converter.py
1:coffee.csv
2:N
3:N
4:N
Traceback (most recent call last):
File "converter.py", line 85, in <module>
YNPhatPriority = sys.argv[5]
IndexError: list index out of range

C:\Python26>
Feb 24, 2013 at 9:56 AM
I added "coffee". Still

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Edward Morgan>cd c:\python25
The system cannot find the path specified.

C:\Documents and Settings\Edward Morgan>cd c:\python26

C:\Python26>python.exe converter.py coffee coffee.csv N N N
Number of args = 6
0:converter.py
1:coffee
2:coffee.csv
3:N
4:N

5:N

PARMS:
1) database=coffee
2) inputCSVFilename=coffee.csv
3) YNPhatCategory=N
4) YNPhatColor=N

5) YNPhatPriority=N

Traceback (most recent call last):
File "converter.py", line 124, in <module>
noteTemplateFile = open(noteTemplateFilename,"r")
IOError: [Errno 2] No such file or directory: 'EverNote_Template_Note.xml'

C:\Python26>
Coordinator
Feb 25, 2013 at 2:49 AM
You did the correct thing by adding the extra parm. Now it's simply saying that the file 'EverNote_Template_Note.xml' cannot be found. Try copying that file from what you downloded from Codeplex to the directory you are running in, along with Evernote_Template_Footer.xml and Evernote_Template_Header.xml.

Neal
Mar 2, 2013 at 7:39 AM
I managed to create an enex file, but cannot import it into ever-note. I get an error. What should I do?

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Edward Morgan>cd c:\python27

C:\Python27>python.exe converter.py coffee coffee.csv Y Y Y
Number of args = 6
0:converter.py
1:coffee
2:coffee.csv
3:Y
4:Y

5:Y

PARMS:
1) database=coffee
2) inputCSVFilename=coffee.csv
3) YNPhatCategory=Y
4) YNPhatColor=Y

5) YNPhatPriority=Y

Created output file: coffee.ENEX with 14 notes.

C:\Python27>

If I try to import it into evernote it says "MISSING_NOTE_TITLE", cannopt import notes.

What should I do?
Mar 2, 2013 at 9:07 AM
Slowly I am doing things. I saw that the TITLE refers to the Phatnotes title. After I fixed this,
I am having trouble importing due to non UTF Data. The Note Editor you suggested before does not work.You said to search for \x80-\xFF but it only looks for this text.

What should I do to find the non UTF-8 characters?

I am using Notepad++ version 6.2.3.

So my question now refers as to how I can find and remove these characters.
Mar 3, 2013 at 1:54 AM
Everything is now working except for the UTF-8 issue.
No matter if I search for [\x80-\xFF] or \x80-\xFF still non UTF-8 data remains.

Notepad++ does not seem to be working. Should I search for something else?

Again, the only problem remaining is non UTF-8 data. How do I remove it?
Coordinator
Mar 4, 2013 at 3:04 AM
Did you click the "Regular Expression" checkbox on lower left side of the Find/Search screen?

Here's an example:

Image

How many notes do you have? You could try the divide and conquer approach, i.e. move one set of notes a time, or delete some notes out of the file, and import it in smaller chunks to help find where the mystery unicode is.

Neal
Mar 4, 2013 at 3:39 AM
Yes, but my newer version has another box.

I tried to put an example picture but the site would not let me.
Coordinator
Mar 4, 2013 at 3:50 AM
Edited Mar 4, 2013 at 3:51 AM
You can upload a pic here and paste the link: http://tinypic.com/

I just checked the new version, and the Find/Replace screen is essentially the same.

Neal
Mar 5, 2013 at 7:43 AM
No need to upload a picture.

I got everything to work. Notepad++ does not do a good job of removing ALL non UTF-8 data. I saw "encoding" when I opened an enex file for editing. I saw it was not encoded in UTF-8 and then clicked on UTF-=8. It highlighted all the non UTF-8 data. There must be an easy way to just delete the highlighted data, but I did not know it. Instead, with the data highlighted, I manually deleted the data one by one and all worked fine when I saved the file.

Non UTF-8 data sneaks in when you copy and paste which I did a lot. Viet Namese, Indian, Gewrman stuff.

In summary, all 500+ notes are converted.

Thank you. It saved a lot of time.
Coordinator
Mar 5, 2013 at 1:19 PM
Great news. I spent a few hours one weekend trying to get it to work with UTF-16, but I got frustrated and gave up. Evernote supports UTF-16 which allows you to use the foreign words & alphabets, but my Python skills were lacking to complete that functionality.

Neal