qif decimal radix parse error

Larry Evans jcampbell3@prodigy.net
Sun, 01 Sep 2002 10:20:20 -0500


When importing a qif file, sometimes there's errors when reading amounts.
For example, there's one entry:

D2/24/97
NBuyX
Y1stAmer Bank
I1
Q6,011
U6,011.00
T6,011.00
MEst. price as of 2/24/97
L[1stAmer Bank-Cash]
$6,011.00
^

which ALWAYS appears as a split with amounts 89, 11, and 601100.
89+11=100, which looks suspicious.  Other amounts, with commas,
are parsed correctly.

I've tried debugging using the following test.scm file:

(load "/usr/share/gnucash/scm/depend.scm")
(gnc:depend "qif-import/qif-file.scm")
(define *qif-file* #f)
(define *qif-name* "/home/evansl/QIF.dir/1stAmerBank-Save.QIF")
(define *ticker-map* #f)
(define *load-return* #f)
(define *qif-file-load* qif-file:read-file)
(set! *qif-file* (make-qif-file))
(set! *ticker-map* (make-ticker-map))
(set! *load-return* (*qif-file-load* *qif-file* *qif-name* *ticker-map*))

This is based on the c code in druid-qif-import.c.  My .bash_profile
includes:

GNC_RUN_AS_SHELL=1

and when I run gnucash, I get this:

[evansl@localhost QIF.dir]$ gnucash --debug
guile> (load "./test.scm")

GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup):
assertion `hash_table != NULL' failed.

Gtk-WARNING **: gtk_type_create(): unknown parent type `21'.
....
Gtk-WARNING **: gtk_type_create(): unknown parent type `21'.

Gtk-WARNING **: invalid cast from `GnomeStock' to `(unknown)'
Segmentation fault
[evansl@localhost QIF.dir]$


I need advice on the best way to find the problem.

TIA.