disappearing data or correupt data file

Jack ostroffjh at users.sourceforge.net
Tue Oct 3 00:37:32 BST 2023


TL;DR at some point in the past day or two (during my monthly  
reconciliation of my Merrill Lynch investment accounts) a stray  
</KMYMONEY-FILE> ended up in the middle of the <PRICES> section of my  
xml data file.  I noticed this because I started getting the  
consistency-check message about no price on or before the first use of  
a security.  That led to noticing that many prices were missing, and I  
ended up actually looking in the xml file.

I'm in process (after making several copies of all saved backups from  
the past two days) of splicing the missing <PRICEPAIRS> sections the  
the whole <REPORTS> section from the last good file into the current  
one (I have no budgets or onlinejobs, so those sections are empty.)   
I'd love to know how this might have happened, as well as any things to  
look for that this type of data surgery might introduce.

-------

I'm doing my monthly reconciliation of all my Merrill Lynch investment  
accounts, and I started getting the "no price for first use date" for  
one security.  The equity exists, and there are security accounts for  
it in two different investmant accounts.  In both cases, the initial  
presence was from an Add Shares transaction (it was a dividend from a  
related stock) and was all sold over the past few months.  However,  
there are currently NO prices for this equity in my file.  Searching  
through explicit backups and my autosave backups, the prices are in all  
files prior to 17:15 this evening, but missing from all files after  
that time.

Further looking shows that in the earliest bad file, within the  
<PRICES>......</PRICES> section there is clearly a problems:

     <PRICEPAIR from="E000520" to="USD">
       <PRICE date="2023-09-01" price="5159/50" source="Yahoo Finance"/>
       <PRICE date="2023-09-30" price="10287/100" source="Yahoo  
Finance"/>
     </PRICEPAIR>
   </PRICES>
</KMYMONEY-FILE>
<PRICEPAIR from="E000525" to="USD">
    <PRICE date="2022-06-22" price="2367/50" source="User"/>
   <PRICE date="2022-09-11" price="2597/50" source="Yahoo Finance"/>
....

Where did that </KMYMONEY-FILE> come from?  I have not been editing the  
file manually (at least not today :-).

Stranger, the current file at that point is
     <PRICEPAIR from="E000520" to="USD">
       <PRICE date="2022-05-24" price="25080049/380000"  
source="Transaction"/>
       <PRICE date="2022-06-03" price="3653/50" source="Yahoo Finance"/>
... all these PRICEs are correct
       <PRICE date="2023-09-30" price="10287/100" source="Yahoo  
Finance"/>
     </PRICEPAIR>
     <PRICEPAIR from="E000525" to="USD">
       <PRICE date="2022-06-22" price="89971/1940" source="User"/>
     </PRICEPAIR>
     <PRICEPAIR from="E000526" to="USD">
       <PRICE date="2022-06-24" price="20697/380" source="User"/>
     </PRICEPAIR>

So it seems to have kept one pricepair for most but not all the  
following equities, and the prices kept are for the first date of the  
existing pairs, but the price itself seems totally unrelated.

Of course since everything past that point is gone, I now have no  
custom reports either.

Do I just chalk this up to haveing a bad day, or perhaps sunspots, or  
is there any hope of figuring out what might have ac tually happened.
   <REPORTS/>
One odd thing is that I've got several files with </KMYMONEY-FILE> in  
the middle of a <PRICEPAIRS> section, so KMM persisted in writing bad  
files.  All the accounts and transactions seem fine, it's just the  
prices which are messed up (and the reports missing.)

Any thoughts or suggestions?

(The reason I don't want to simply revert to the last known good file  
is that I'd have to redo over an hour of importing and reconciliation  
work, although I know I may yet need to resort to that.


More information about the KMyMoney-devel mailing list