Bug 283848 - can not import gnucash data
Summary: can not import gnucash data
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
: 297186 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-12 09:28 UTC by Jaime Torres
Modified: 2012-03-31 18:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
The minimal gnucash xml file I can get to reproduce the bug (53.65 KB, application/octet-stream)
2011-12-14 19:25 UTC, Jaime Torres
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jaime Torres 2011-10-12 09:28:02 UTC
Version:           SVN trunk (using Devel) 
OS:                Linux

I'm trying to import gnucash data to continue with kmymoney (you know, I like KDE software), but I can not because I get two message boxes:

The first says:
Unknown account id 'f38ce96bcaf79d5e99bc7d5ae6234444'

The second says:
Cannot load file /home/conta/contabilidad/finanzas.segundo.intento. Reason: No storage object attached to MyMoneyFile

Then I see the account totals, and the completion bar at the bottom at 0%. And as soon as I try to do something, kmymoney gets frozen. I can close it clean, anyway.

Reproducible: Always

Steps to Reproduce:
import gnucash data (version 2.4.7)


Expected Results:  
At least the second message is not there. There should be a storage object attached to MyMoneyFile.
Comment 1 Cristian Oneț 2011-12-12 15:20:05 UTC
Could you attach a Gnu Cash testfile with which to reproduce this?
I'm asking you this because if you stumbled upon this bug it would be much easier for you to create a Gnu Cash test file with something similar that you have in the real file for account 'f38ce96bcaf79d5e99bc7d5ae6234444'.
Without that the chances of fixing this are pretty low since we (the development team) barely have time so we tend to concentrate on fixing the bugs which are straight forward to reproduce.
Comment 2 Jaime Torres 2011-12-12 19:33:06 UTC
While I'm stripping the xml file to the minimum expression to reproduce the problem, and removing personal data...
One simple thing can be done: Instead of showing the account-id in the message box, please show the act:name or the act:description (or both).
Comment 3 Jaime Torres 2011-12-14 19:25:01 UTC
Created attachment 66756 [details]
The minimal gnucash xml file I can get to reproduce the bug

The problem seems to be the programmed event. When I remove it from the file, no problem importing. In any case, no input file should never affect kmymoney the way it does. (Version 4.6.90-085723bfcd)
Comment 4 Cristian Oneț 2011-12-14 20:08:17 UTC
Git commit b570d0c62808a9e1f5333178bc7d06f6d1825852 by Cristian Oneț.
Committed on 14/12/2011 at 21:02.
Pushed by conet into branch 'master'.

Disable MyMoneyFile signals while we import a GnuCash file.

This is needed to avoid updating views while the import is not
finished and the data in the MyMoneyFile is not ready to be used.

BUG: 283848

M  +3    -2    kmymoney/converter/mymoneygncreader.cpp

http://commits.kde.org/kmymoney/b570d0c62808a9e1f5333178bc7d06f6d1825852
Comment 5 Cristian Oneț 2011-12-14 20:09:04 UTC
Git commit 628049a0d28397fde8bfecdd03b3682419bb90d7 by Cristian Oneț.
Committed on 14/12/2011 at 21:02.
Pushed by conet into branch '4.6'.

Disable MyMoneyFile signals while we import a GnuCash file.

This is needed to avoid updating views while the import is not
finished and the data in the MyMoneyFile is not ready to be used.

BUG: 283848

M  +3    -2    kmymoney/converter/mymoneygncreader.cpp

http://commits.kde.org/kmymoney/628049a0d28397fde8bfecdd03b3682419bb90d7
Comment 6 Phillip Vuchetich 2012-01-17 05:49:47 UTC
Thanks Cristian Onet,

I confirmed this bug and patch in KMyMoney 4.6.1 on FreeBSD 9 x86-64.  I was unable to import a Gnucash 2.4.7 XML file.  This was a showstopper for me to convert to KMyMoney.

I applied the 2011-12-14 mymoneygncreader.cpp file, recompiled, and the import error was resolved.

Confirmation steps:
Prior to the bugfix, I also saw the message "unknown account ID" message.  I reviewed the gnucash XML and saw the unknown account was a placeholder account called "Retirement", which only contained other accounts.  After the fix, this particular account was imported as "Asset > Assets > Investments > Retirement", and contained the other real accounts.

I also saw the "no storage object" message, and was unable to save the file.

After the patch, I have confirmed that the file imported, saved, and re-opened.
Comment 7 Cristian Oneț 2012-03-31 18:51:22 UTC
*** Bug 297186 has been marked as a duplicate of this bug. ***