Parse Error

67 views
Skip to first unread message

jayb.k...@gmail.com

unread,
Nov 30, 2013, 8:26:21 AM11/30/13
to mnemosyne-...@googlegroups.com
Hello everyone,

I am having troubles to import my *.cards file in mneomysine, which worked fine for several months.

I am currently working on two pc's with mneomsyne: 1 at school(portable version since i may not install stuff on their pc's) where i mainly create the cards and learn them, and my pc at home. After each session at school I commit my *.cards file to a svn and update it at home, so i can learn with the latest card set. But Since I updatet two weeks ago the import-process is failing where I get the following error-Message:

An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
File "mnemosyne\pyqt_ui\import_dlg.pyo", line 78, in accept
File "mnemosyne\libmneomsyne\file_formats\mnemosyne2_cards.pyo", line 209, in do_import
File "openSM2sync\text_formats\xml_format.pyo", line 122, in parse_log_entries
File "<string>", line91, in next
ParseError: not well-formed (invalid token): line854, column 32


I`ve tried reinstalling mnemosyne, importing it to a new database and importing it on the portable version but none of this stuff worked.

I really do not know what the problem is, so I would really appreciate any help and explenation. If you need the card files or log files or so, please tell me.

Greetings

Peter Bienstman

unread,
Dec 1, 2013, 12:58:21 AM12/1/13
to mnemosyne-...@googlegroups.com
Please send me privately your cards file as well as your db file.

Cheers,

Peter

Hello everyone, 

I am having troubles to import my *.cards file in mneomysine, which worked fine for several months.

I am currently working on two pc's with mneomsyne: 1 at school(portable version since i may not install stuff on their pc's) where i mainly create the cards and learn them, and my pc at home. After each session at school I commit my *.cards file to a svn and update it at home, so i can learn with the latest card set. But Since I updatet two weeks ago the import-process is failing where I get the following error-Message:

An unexpected error has occurred.
Please forward the following info to the developers:

Traceback (innermost last):
File "mnemosyne\pyqt_ui\import_dlg.pyo", line 78, in accept
File "mnemosyne\libmneomsyne\file_formats\mnemosyne2_cards.pyo", line 209, in do_import
File "openSM2sync\text_formats\xml_format.pyo", line 122, in parse_log_entries
File "<string&
 gt;",
line91, in next

Peter Bienstman

unread,
Dec 2, 2013, 4:12:03 AM12/2/13
to mnemosyne-...@googlegroups.com
Hi,

The issue seems to be the symbols at XXX in the following card:

Auch die Boysche Fläche kann im XXX nur mit Selbstdurchdringungen
dargestellt werden

They are not valid unicode, and I have no idea how they ended up in
Mnemosyne (perhaps a strange paste or import?).

So, just edit that card and you should be fine.

Cheers,

Peter
> --
> You received this message because you are subscribed to the Google Groups
> "mnemosyne-proj-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mnemosyne-proj-u...@googlegroups.com.
> To post to this group, send email to mnemosyne-proj-
> us...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mnemosyne-proj-users/8d50b07e-
> d95c-477f-a6de-c43a6bd04dad%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

jayb.k...@gmail.com

unread,
Dec 2, 2013, 11:43:07 AM12/2/13
to mnemosyne-...@googlegroups.com
Hello,

first of all: thank you very much for your help, time and effort you put into solving my problem. Meanwhile I have tested every revision of my cards I had checked into my svn and I noticed that the cards broke on the date I added that "boysche surface" card. I was at school today where I edited that invalid card and i am back home and the import crashed again BUT on the good side the line has shifted. So I think there might be more of those invalid characters which i probably will have to edit all manualy :( ( i started to copy/paste from my math-pdf where mathmatical symbols appear... i try to edit them while creating the card but ive propably overlooked some of those!)

what would be helpfull for me: Is there any way to simplify the search for those invalid characters or do i have to go through each and every card ?!

Thanks and have a nice day!

Peter Bienstman

unread,
Dec 2, 2013, 11:50:38 AM12/2/13
to mnemosyne-...@googlegroups.com
There is no easy way to search for these, but the way I found out which card
had the problem was by changing the extension from the cards file to zip,
unzipping and then looking at the xml file to the line and the column
referenced in the error.

Also, feel free to send me that pdf file you pasted from. I'll see if
there's an easy way for Mnemosyne to filter out these strange characters
upon pasting.
> https://groups.google.com/d/msgid/mnemosyne-proj-users/de998f75-
> 4ca8-4f9f-9cb1-4778157bf216%40googlegroups.com.

jayb.k...@gmail.com

unread,
Dec 4, 2013, 12:59:10 PM12/4/13
to mnemosyne-...@googlegroups.com
Hi Peter,

that method (zipping and looking for the line/column) was really helpful and fastened up the process of correcting my cards. There were only a few of them so it was quite simple.

I will send you the page privately that caused the error. It was mainly the Real-Numbers symbol that was causing the parsing process to fail.

What was a bit of a unhappy situation for me, was that I could not edit the cards at home because the import already failed while at the pc in school nothing crashed and I could edit the card. Its kind of a strange behaviour for a programm that you can create cards with invalid characters but can not edit them on another system. Maybe it would be nice, if every card created would be parsed and searched for some invalid stuff that occurs and give the user a feedback if there is something wrong with the card. But I dont know how complex that would be.

Thanks for your help!
And 1 page of the script is coming soon!

Regards

Reply all
Reply to author
Forward
0 new messages