Discussion:
[skrooge] [Bug 400724] New: [ERR-5]: Import of Quicken 2012 .QIF file failed
Add Reply
skierpage
2018-11-06 02:02:17 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

Bug ID: 400724
Summary: [ERR-5]: Import of Quicken 2012 .QIF file failed
Product: skrooge
Version: 2.14.0
Platform: Fedora RPMs
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: ***@gmail.com
Reporter: ***@gmail.com
CC: ***@mankowski.fr
Target Milestone: ---

SUMMARY
skrooge fails to import my exported my Quicken Deluxe 2012 .QIF file.

STEPS TO REPRODUCE
1. I exported my Quicken Deluxe 2012 data as QDATA_export.QIF
2. In Skrooge, choose File > Import > Import... and navigate to this .QIF file

OBSERVED RESULT
Nothing was imported. Skrooge's Messages pane showed
[ERR-5]: Import of file named
'file:///path/to/Windows/Quicken/QDATA_export.QIF' failed
and the terminal whence I started skrooge displayed
##WARNING: SKGServices::stringToInt(ex) failed
##WARNING: SKGServices::stringToInt(pe) failed
##WARNING: SKGServices::stringToInt(ns) failed
##WARNING: SKGServices::stringToInt(es) failed
##WARNING: SKGServices::stringToInt(ex) failed
##WARNING: SKGServices::stringToInt(pe) failed
##WARNING: SKGServices::stringToInt(ns) failed
##WARNING: SKGServices::stringToInt(es) failed

EXPECTED RESULT
Success.

SOFTWARE VERSIONS
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Import of a really simple .QIF with a single credit card worked OK.
I couldn't find the freestanding strings "es|ex|ns|pe" in the .QIF file.
Let me know if there's a way to get additional diagnostic output, I have some
familiarity with gdb.
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-11-06 12:20:47 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

Stephane MANKOWSKI <***@mankowski.fr> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|***@gmail.com |***@mankowski.fr

--- Comment #1 from Stephane MANKOWSKI <***@mankowski.fr> ---
When you have the error, you should be able to click on "History" to get more
information.

I can analyze the issue if you can provide me a sample file to reproduce the
problem.
You can send me it by email (see "About" in Skrooge) and don't forget to
replace sensible data inside.
Regards.
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-11-10 12:42:56 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #2 from Stephane MANKOWSKI <***@mankowski.fr> ---
Do you have an answer?
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-11-19 22:03:09 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #3 from Stephane MANKOWSKI <***@mankowski.fr> ---
Hi,

Without information, I won't be able to do a correction.
So, do you have an answer?
--
You are receiving this mail because:
You are watching all bug changes.
skierpage
2018-11-24 02:11:14 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #4 from skierpage <***@gmail.com> ---
Thanks for responding, sorry for my delay.

(In reply to Stephane MANKOWSKI from comment #1)
Post by Stephane MANKOWSKI
When you have the error, you should be able to click on "History" to get
more information.
The failed import puts nothing in the History panel at all.
Is there a way to set KDebugDialog5 or Qt debug flags to generate Skrooge debug
output?
Post by Stephane MANKOWSKI
I can analyze the issue if you can provide me a sample file to reproduce
the problem.
I'll boot into Windows and see if I can create a second dummy Quicken account
and export from it. This one is decades of financial data (3.4 MB), I can't
clean up all its sensitive data.
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-11-24 08:39:32 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #5 from Stephane MANKOWSKI <***@mankowski.fr> ---
You can enable traces by doing this from a console:
export SKGTRACE=5
skrooge > traces.txt 2>&1

Thank you for the sample.
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-12-01 16:03:07 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #6 from Stephane MANKOWSKI <***@mankowski.fr> ---
Do you have an answer?
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-12-06 07:46:46 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #7 from Stephane MANKOWSKI <***@mankowski.fr> ---
Do you have an answer?
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-12-09 10:41:08 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

Stephane MANKOWSKI <***@mankowski.fr> changed:

What |Removed |Added
----------------------------------------------------------------------------
Latest Commit| |https://commits.kde.org/skr
| |ooge/b6cff4bad4c0875ad3b974
| |684cb298b4253388f0
Status|REPORTED |RESOLVED
Resolution|--- |FIXED

--- Comment #11 from Stephane MANKOWSKI <***@mankowski.fr> ---
Git commit b6cff4bad4c0875ad3b974684cb298b4253388f0 by Stephane MANKOWSKI.
Committed on 09/12/2018 at 10:40.
Pushed by smankowski into branch 'master'.

Import of Quicken 2012 .QIF file failed due to tags

M +1 -0 CHANGELOG
M +1 -0 plugins/import/skrooge_import_qif/skgimportpluginqif.cpp
A +582 -0 tests/input/skgtestimportqif2/400724.qif
M +14 -0 tests/skgbankmodelertest/skgtestimportqif2.cpp

https://commits.kde.org/skrooge/b6cff4bad4c0875ad3b974684cb298b4253388f0
--
You are receiving this mail because:
You are watching all bug changes.
Stephane MANKOWSKI
2018-12-09 10:42:36 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #12 from Stephane MANKOWSKI <***@mankowski.fr> ---
Hi,

Thank to your sample file, I fixed the first issue.
Please open another bug for the second issue. If you can provide another sample
file it will be helpful.
--
You are receiving this mail because:
You are watching all bug changes.
skierpage
2018-12-09 09:42:49 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #8 from skierpage <***@gmail.com> ---
(In reply to Stephane MANKOWSKI from comment #5)
OK, I booted into Windows 10, exported my Quicken data various ways, and am now booted back into Fedora Linux. Thanks for your patience!
export SKGTRACE=5
skrooge > traces.txt 2>&1
If I do this with my original failing QIF export file of everything, the traces
file has

...
## Input local
filename=/media/Windows/Users/spage/Documents/Quicken/QDATA_export_all.QIF
## >virtual SKGError SKGImportPluginQif::importFile()
## >virtual SKGError SKGDocument::beginTransaction(const QString&, int,
const QDateTime&, bool)
## <virtual SKGError SKGDocument::beginTransaction(const QString&, int,
const QDateTime&, bool) RC=[SUC-0]
## >static QString SKGServices::getDateFormat(const QStringList&)
## WARNING: SKGServices::stringToInt(ex) failed
## WARNING: SKGServices::stringToInt(pe) failed
## WARNING: SKGServices::stringToInt(ns) failed
## WARNING: SKGServices::stringToInt(es) failed
## WARNING: SKGServices::stringToInt(ex) failed
## WARNING: SKGServices::stringToInt(pe) failed
## WARNING: SKGServices::stringToInt(ns) failed
## WARNING: SKGServices::stringToInt(es) failed
## <static QString SKGServices::getDateFormat(const QStringList&)
## >virtual SKGError SKGDocument::endTransaction(bool)
## <virtual SKGError SKGDocument::endTransaction(bool) RC=[SUC-0]
## <virtual SKGError SKGImportPluginQif::importFile() RC=[ERR-5]: Date
format not supported
## >virtual SKGError SKGDocument::endTransaction(bool)
## <virtual SKGError SKGDocument::endTransaction(bool) RC=[SUC-0]
## <virtual SKGError SKGImportExportManager::importFile() RC=[ERR-5]: Date
format not supported
## >virtual SKGError SKGDocument::endTransaction(bool)
...

I created a brand-new Quicken file with a handful of transactions and exported
the whole thing and that imported fine; in place of the
SKGServices::stringToInt errors the trace output has
virtual SKGError SKGDocument::beginTransaction(const QString&, int, const
QDateTime&, bool)

and goes on to succeed.

I don't understand the QIF file format, but I notice that my failing QIF file
has all my Quicken categories and tags in it. Tags are a way to tag
transactions independently of categories, for example I tag some purchases with
who in my family made them. I think this is like Skrooge's "Trackers. (An old
GnuCash manual
https://stuff.mit.edu/afs/sipb/project/gnucash/1.6.4/arch/sun4x_58/share/gnome/help/gnucash/C/intro.html
calls the tags in QIF files "classes" for some reason.) I did not use any tags
in my test file that Skrooge imported OK. My tags section appears at the top of
my failing QIF file like
!Type:Tag
NS
Dexpenses S incurs
^
NJane Doe
Dexpenses that Jane Doe incurs
^
A transaction that includes a tag has a line like
LMedical:Insurance/S
showing the category:subcategory/tag. I manually copied the !Tag section above
into my test QIF output file, and tagged one transaction in it, and then it
failed to import and has the identical
<virtual SKGError SKGImportPluginQif::importFile() RC=[ERR-5]: Date format
not supported error and the stringToInt(SSS) failed" WARNINGs). I will attach
that manually crafted test .QIF file.

So I suspect the bug here is that Skrooge doesn't handle Quicken tags. The
high-ish priority fix is to ignore the !Tag section rather than erroring. The
enhancement would be to handle Quicken tags and parse a Quicken
SomeCategory:ItsSubcategory/A_tag_name line ; I think tags map well to
Skrooge's Trackers.
--
You are receiving this mail because:
You are watching all bug changes.
skierpage
2018-12-09 09:46:04 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #10 from skierpage <***@gmail.com> ---
OK, so the workaround is to not export tags from Quicken. However...

I also exported all my transactions and only them (no accounts, categories,
tags) to another QIF file, and import of that took 30+ seconds (as opposed to
the above imports that failed immediately) before failing with the same ERR-5
user interface message. The trace file showed no errors during getDateFormat(),
but then after more output it has the single error

## <virtual SKGError SKGImportPluginQif::importFile() RC=[ERR-5]:
SKGCategoryObject::addCategory failed because linked object is not yet saved in
the database.

with no other useful info.

This might be more fallout from my use of tags, or it could be a different
import problem. Is there a different SKGTRACE value to set for this second
problem? I could open a separate bug for it.
--
You are receiving this mail because:
You are watching all bug changes.
skierpage
2018-12-09 09:45:18 UTC
Reply
Permalink
https://bugs.kde.org/show_bug.cgi?id=400724

--- Comment #9 from skierpage <***@gmail.com> ---
Created attachment 116799
--> https://bugs.kde.org/attachment.cgi?id=116799&action=edit
QIF export of a test Quicken file with manually-added tags
--
You are receiving this mail because:
You are watching all bug changes.
Loading...