This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KMM 5.12 :- Parsing error

Tags: None
(comma "," separated)
tburke
Registered Member
Posts
49
Karma
0

KMM 5.12 :- Parsing error

Fri May 12, 2023 9:58 am
This morning I encountered this error again; the error message is "File was not parsable! ./kmymoney/plugins/xml/mymoneystoragexml.cpp:1402"

On previous occasions, I have reverted to a backup which has then worked.

On this occasion, I can open the backup ok... however, when I close it then try to re-open it... I get the parsing error!! This has happened on several backups.

I am using Desktop: MATE 1.26.0 Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy

( I have another PC using the same Linux Mint and KMM version, this is currently working ok.)

Any suggestions on next steps please
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: KMM 5.1.2 :- Parsing error

Fri May 12, 2023 11:38 am
Not sure if this helps, but at least worth a trial. Please take a look at the posts in this thread. You can convert your file into xml with the following command (replace xxx below with your filename):
zcat xxx.kmy > xxx.xml

then run the check
xmllint xxx.xml

and see if that reports problems or not.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
tburke
Registered Member
Posts
49
Karma
0

Re: KMM 5.12 :- Parsing error

Fri May 12, 2023 12:00 pm
Thanks for the reponse, here's the output:-
Code: Select all
tony@tony-ThinkPad-X250:~/Desktop$ zcat KMM2011onwards.kmy > KMM2011onwards.xml
tony@tony-ThinkPad-X250:~/Desktop$ xmllint KMM2011onwards.xml
KMM2011onwards.xml:41578: parser error : Char 0x0 out of allowed range
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : AttValue: ' expected
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : attributes construct error
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : Couldn't find end of Start Tag SPLIT line 41578
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : Premature end of data in tag SPLITS line 41577
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                       
tburke
Registered Member
Posts
49
Karma
0

Re: KMM 5.12 :- Parsing error

Fri May 12, 2023 12:21 pm
tburke wrote:Thanks for the reponse, here's the output:-
Code: Select all
tony@tony-ThinkPad-X250:~/Desktop$ zcat KMM2011onwards.kmy > KMM2011onwards.xml
tony@tony-ThinkPad-X250:~/Desktop$ xmllint KMM2011onwards.xml
KMM2011onwards.xml:41578: parser error : Char 0x0 out of allowed range
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : AttValue: ' expected
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : attributes construct error
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : Couldn't find end of Start Tag SPLIT line 41578
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : Premature end of data in tag SPLITS line 41577
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                       

I recognise some of the names in that error string ( eg continente supermarket); i opened another backup and was able to open it, I found that those names appear in the Memo associated with a split transaction on a closed credit card. I have deleted the comments but the file still exhibits the parsing problem when I try to reopen the KMY.
Neither the kmy or xml files will open.
If I re-run the above code on the KMY file, it now gives a "gzip:- unexpected end of file " error.
tburke
Registered Member
Posts
49
Karma
0

Re: KMM 5.12 :- Parsing error

Fri May 12, 2023 12:28 pm
I have tried reading the suggested thread; however, it's mostly above my technical knowledge.. although I do see mention of rogue characters in the memo field.

Are there any suggested next steps please?
tburke
Registered Member
Posts
49
Karma
0

Re: KMM 5.12 :- Parsing error

Fri May 12, 2023 8:10 pm
tburke wrote:
tburke wrote:Thanks for the reponse, here's the output:-
Code: Select all
tony@tony-ThinkPad-X250:~/Desktop$ zcat KMM2011onwards.kmy > KMM2011onwards.xml
tony@tony-ThinkPad-X250:~/Desktop$ xmllint KMM2011onwards.xml
KMM2011onwards.xml:41578: parser error : Char 0x0 out of allowed range
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : AttValue: ' expected
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : attributes construct error
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : Couldn't find end of Start Tag SPLIT line 41578
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                                                                               ^
KMM2011onwards.xml:41578: parser error : Premature end of data in tag SPLITS line 41577
2-19" memo="club 27 
eulailia 25 shop 15 .

continente 87...139

                       

... I found that those names appear in the Memo associated with a split transaction on a closed credit card. I have deleted the comments but the file still exhibits the parsing problem .


Update... upon re-checking there was a rogue space in the transaction comment which I had overlooked and not deleted.... the file now opens ok.

Question:-that comment had been there for several years: why did it only now cause a problem?
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: KMM 5.12 :- Parsing error

Sun May 14, 2023 9:50 am
I think this problem raised when we changed the way the KMyMoney data is converted to XML before writing to storage. We did this because the order of attributes inside an XML element was different with each save operation. This prevented us to spot changes between these two versions easily.

More on that can be found in the following discussion which happened almost 2 years ago. AFAIR, the original problem stems from importing these rogue characters through online statement import and not removing/converting them before using them in XML so that they do not cause the problem you encountered when reading the file because it would then be invalid XML.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
tburke
Registered Member
Posts
49
Karma
0

Re: KMM 5.12 :- Parsing error

Sun May 14, 2023 10:25 am
ipwizard wrote:I think this problem raised when we changed the way the KMyMoney data is converted to XML before writing to storage. We did this because the order of attributes inside an XML element was different with each save operation. This prevented us to spot changes between these two versions easily.

More on that can be found in the following discussion which happened almost 2 years ago. AFAIR, the original problem stems from importing these rogue characters through online statement import and not removing/converting them before using them in XML so that they do not cause the problem you encountered when reading the file because it would then be invalid XML.


Thank you for your response and ongoing support.

I've had a look at the suggested link; unfortunately, I do not understand that level of coding. However, it mentions something like " rogue characters from imported data may cause the parsing issue".

In my case, I do not import any data and, in my most recent parsing error, the offending text had been there for many years.

Are there any additional steps which a user can do to prevent future parsing errors?

Thanks again.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: KMM 5.12 :- Parsing error

Sun May 14, 2023 10:29 am
The current code should take care of that so no user intervention is needed.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]