I think I've nailed this bug. Apply this modification to qif-to-gnc.scm and it should handle empty S fields. C
modified gnucash/import-export/qif-imp/qif-to-gnc.scm @@ -584,13 +584,11 @@ (hash-ref qif-memo-map qif-memo))) (and (string? memo) (not (string=? memo "")) - (hash-ref qif-memo-map memo)))) - (if (not far-acct-info) - (set! far-acct-info - (hash-ref qif-memo-map - (default-unspec-acct)))))) + (hash-ref qif-memo-map memo)))))) - (set! far-acct-name (qif-map-entry:gnc-name far-acct-info)) + (set! far-acct-name (if far-acct-info + (qif-map-entry:gnc-name far-acct-info) + (default-unspec-acct))) (set! far-acct (hash-ref gnc-acct-hash far-acct-name)) On Fri, 28 Feb 2020 at 15:41, Christopher Lam <christopher....@gmail.com> wrote: > (attachment snipped) > > To help you import your old quicken datafile, you would best revert to > 3.1, import completely then upgrade to 3.8. The offending code has been > identified but is *very* difficult to understand because the author left > nearly 20 years ago. Meanwhile the code base and the language have both > moved on. > > On Tue, 25 Feb 2020 at 18:34, Tom Hatzigeorgiou <tomh...@hotmail.com> > wrote: > >> Hi I have attached the first year of my data that fails as I try to >> import into GC. >> I have data since '89, the first year that I have an issue with is 1997. >> It was about the time that I started trading, so maybe the problem has >> something to so with my trading account. >> >> Again, the QIF file loads with no problem using GC (for windows) version >> 3.1 (gnucash-3.1-2.setup.exe), but it fails with the importer of version >> 3.8 (gnucash-3.8.setup.exe). >> >> Thank you. >> >> >> >> ------------------------------ >> *From:* Tom Hatzigeorgiou <tomh...@hotmail.com> >> *Sent:* Tuesday, February 18, 2020 11:18 PM >> *To:* Frank H. Ellenberger <frank.h.ellenber...@gmail.com> >> *Cc:* Christopher Lam <christopher....@gmail.com>; GnuCash users group < >> gnucash-u...@gnucash.org>; gnucash-devel <gnucash-devel@gnucash.org> >> *Subject:* Re: [GNC-dev] [GNC] Failed - import of QIF files from Quicken >> >> If what I asked cannot be done i will try to produce a file with the >> errorsome other way >> I would suggest to take these emails offline. I think they confuse the >> user community >> >> I will be in touch >> >> Thanks >> >> >> On Feb 18, 2020 5:34 PM, "Frank H. Ellenberger" < >> frank.h.ellenber...@gmail.com> wrote: >> >> >> >> Am 18.02.20 um 22:52 schrieb Christopher Lam: >> > Sorry. Please ask other devs on public mailing list. >> > >> > On Tue, 18 Feb 2020 at 15:51, Tom Hatzigeorgiou <tomh...@hotmail.com> >> wrote: >> > >> >> To do this someone will need to help me. >> >> I don't know how projects like this work. >> >> I have no idea where the program source exists and the tools I will >> need >> >> to manipulate it. >> >> >> >> I was thinking that a very simple way to debug the code is, for >> someone to >> >> place a display on a version of the new importer where every record >> that it >> >> processes gets displayed (in a log file) before it gets imported. >> >> This way by running the importer I will see at what record(s) it >> failed. >> >> I would run it multiple times until I find and eliminate ALL the >> records >> >> of my file that it fails on. >> >> When all bad records get eliminated and my file gets loaded correctly >> by >> >> the current importer, I don't think I would have a problem sending you >> all >> >> those bad records for you to analyze and see where the new importer >> has >> >> gone bad. >> >> >> >> DO you think something like the above can be done? >> >> At least it should - instead of "Failed" - say "Failed to read line nr >> %d". >> >> That would reduce the burden of bisect. >> >> ~Frank >> >> >> _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel