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

Weird Consistency Check

Tags: None
(comma "," separated)
adkonst
Registered Member
Posts
7
Karma
0
OS

Weird Consistency Check

Thu Oct 14, 2021 1:47 am
I've been happily using KMyMoney for many years now. Over the last month or so, I started getting consistency check errors. Ignored it at first but have now traced it to one asset/checking account.

It's always the same "error" (except for transaction id), on the same checking account and only when creating a new transaction. Modifying existing ones doesn't result in this error.

Error message:
* action marked as interested in split of transaction 'T0000XXXXXX'.
Finished: 1 problem corrected. 0 problems still persist.


KMyMoney version 5.1.2.

Any ideas? I've searched the forum and came up empty.
User avatar
ostroffjh
Registered Member
Posts
253
Karma
0
OS

Re: Weird Consistency Check

Thu Oct 14, 2021 2:57 am
First, please confirm there wasn't a typo in the wording of that error message. Also, what platform/OS are you using?
Next, does this happen with all sorts of transactions (deposit, withdrawal/debit) or just one type? More specifically, what category/categories does this happen for? Are there any categories for which it does not happen?
adkonst
Registered Member
Posts
7
Karma
0
OS

Re: Weird Consistency Check

Thu Oct 14, 2021 3:20 am
First, please confirm there wasn't a typo in the wording of that error message.


There were a couple of typos. The error is:

* action marked as interest in split of transaction 'T0000XXXXXX'.
Finished: 1 problem corrected. 0 problems still present.


Also, what platform/OS are you using?


Fedora 34

Next, does this happen with all sorts of transactions (deposit, withdrawal/debit) or just one type? More specifically, what category/categories does this happen for? Are there any categories for which it does not happen?


It happens with both deposits and withdrawals. I tried several different payer/receivers as well as different categories and I still get the same error. I haven't been able to find a category that doesn't result in this error.

The only common factor is the account. My other accounts do not have this issue.
adkonst
Registered Member
Posts
7
Karma
0
OS

Re: Weird Consistency Check

Thu Oct 14, 2021 3:32 am
I deleted all the transactions going back to February from the account, just in case there was a problem with one of them. I then tried to create a new transaction and it still gave me the error.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Weird Consistency Check

Thu Oct 14, 2021 5:26 am
The message you mention usually identifies a split in a transaction that is referencing a category that is marked as an interest payment in another transaction. To identify such categories, KMyMoney - as part of the consistency check - scans all transactions for a specific marker (action = "interest") in the split and collects all categories matching. Then it checks that all splits referencing one of those categories also carry that marker. That is where the message is generated because the marker was added by the check. Adding it of course forces to be there at least one such split for the next round.

As you mention, the only common factor is the account. In general, this marker is meant to be used by the application on categories to mark expenses or incomes for interest parts of loans. Did you work with a loan account recently and used the affected checking account as interest category?

A fix for your situation can only be performed on the data level. The application does not have a fix for it. Maybe we can add one as soon as we understand how you ended up in this scenario in the first place.

For fix instructions it is essential to know, which form of data storage you are using. Do you keep things in a file or an sql database? Is any of that encrypted (e.g. using gpg) or just compressed (gzip)? You can use the *nix file utility to find out what format the file is, in case you don't know. You find some more information about file formats in the KMyMoney manual.


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

Re: Weird Consistency Check

Thu Oct 14, 2021 1:12 pm
Did you work with a loan account recently and used the affected checking account as interest category?


No, I don't have any kmymoney loan accounts that automatically calculate interest.

A fix for your situation can only be performed on the data level.


I figured as much and have started playing around with the xml contents. I suspect I may have fat fingered a transaction that is causing the conditions you outlined above.

My file is the default kmymoney format (gzip). No encryption.
adkonst
Registered Member
Posts
7
Karma
0
OS

Re: Weird Consistency Check

Thu Oct 14, 2021 9:11 pm
Update:

Deleted all transactions from the checking account. If I now create new transactions, I get no errors. Additionally, when examining the XML, these transactions do not have action="Interest".

Still need to figure out which transaction(s) caused these errors to being with.
adkonst
Registered Member
Posts
7
Karma
0
OS

Re: Weird Consistency Check  Topic is solved

Thu Oct 14, 2021 11:11 pm
I was able to resolve the issue by editing the transactions directly and removing action="Interest"

1. Save file.kmy as file.xml
2. Ran the following sed command:

Code: Select all
sed -i.bak -e '/A000001/s/\=\"Interest\"/=\"\"/' file.xml

Note: replace A000001 with account number in question.

3. gzipped file.xml to file.xml.gz
4. renamed file.xml.gz to file.kmy

Everything seems to be working now.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS

Re: Weird Consistency Check

Fri Oct 15, 2021 5:29 am
adkonst wrote:I was able to resolve the issue by editing the transactions directly and removing action="Interest"

1. Save file.kmy as file.xml
2. Ran the following sed command:

Code: Select all
sed -i.bak -e '/A000001/s/\=\"Interest\"/=\"\"/' file.xml
Note: replace A000001 with account number in question.

3. gzipped file.xml to file.xml.gz
4. renamed file.xml.gz to file.kmy


That is basically what I had in mind to resolve the issue. Did not know how literate you are in using the *nix toolset. Did you know that KMyMoney can read both, XML and compressed XML alike. If you open a file with extension .xml it will not compress it during the next save. If you open a file with extension .kmy which is not compressed, KMyMoney will do the compression for you the next time you save it. So an alternative would look like this:

Code: Select all
cp -p file.kmy file.kmy.ori   # just to keep a backup of the original
zcat file.kmy | sed -e '/A000001/s/\=\"Interest\"/=\"\"/' > file.xml
mv file.xml file.kmy
file.kmy at this point is plain XML but saving it the next time using KMyMoney will compress it again.


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

Re: Weird Consistency Check

Fri Oct 15, 2021 1:12 pm
I knew it was able to open both but I didn't realize it would compress a non-compressed file. That's nifty.

Thanks for the pointers.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]