Bug 401287 - Unable to import gnucash
Summary: Unable to import gnucash
Status: RESOLVED NOT A BUG
Alias: None
Product: skrooge
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.16.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: 25.1.0
Assignee: Stephane MANKOWSKI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-21 18:47 UTC by ward
Modified: 2018-11-22 20:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
text editor opening of .gnucash file (195.96 KB, image/png)
2018-11-21 20:35 UTC, ward
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ward 2018-11-21 18:47:45 UTC
SUMMARY
I am a long time gnucash user. When I try to import my gnucash file (.gnucash) It fails

STEPS TO REPRODUCE
1. Import
2. Select .gnucash file
3. fail

OBSERVED RESULT

[ERR-5]: Import of file named 'file:///home/ward/Desktop/ward.gnucash' failed
[ERR-8]: Invalid XML content in file 'file:///home/ward/Desktop/ward.gnucash'
[ERR-4]: 1-1: 'error occurred while parsing element'

EXPECTED RESULT

import successful

SOFTWARE/OS VERSIONS
Linux: debian testing


ADDITIONAL INFORMATION
skrooge version 2.16.2
Comment 1 Stephane MANKOWSKI 2018-11-21 19:03:14 UTC
Hi,

Skrooge is able to import gnucash file. 
May be your version is not yet supported.
Could you check that your file is not encrypted ?
You must be able to load it in a text editor and you should see XML.
If this is well the case, could you provide me a sample file to reproduce the issue?
Comment 2 ward 2018-11-21 20:33:46 UTC
Hello,
The file is not encrypted.
I can open with a text editor but it does not appear to be xml.
I uploaded a screenshot of it.
Am I doing something wrong? Is there instructions on how to import a .gnucash file?
Comment 3 ward 2018-11-21 20:35:06 UTC
Created attachment 116455 [details]
text editor opening of .gnucash file
Comment 4 Stephane MANKOWSKI 2018-11-21 21:35:37 UTC
The SQLITE format is not supported.
You must save your file in XML format. 
See https://www.gnucash.org/docs/v3/C/gnucash-guide/basics-files1.html
Comment 5 ward 2018-11-21 22:16:02 UTC
Now in xml format.
It starts / begins importing, then:
[ERR-5]: Import of file named 'file:///home/ward/Desktop/ward.gnucash' failed
[ERR-5]: Operation 'SKGDocumentBank::addOrModifyUnitValue' on 'Integra Short Term -DPSP / 2009-12-31 / -inf' failed
[ERR-8]: Value of a currency cannot be a negative value
Comment 6 Stephane MANKOWSKI 2018-11-22 15:36:28 UTC
Could you provide me a sample file?
Comment 7 ward 2018-11-22 20:30:33 UTC
I tried saving as XML again. 
It all imported.
Thank you very much for your help!!!
Now I just need to learn Skrooge.