On Thu, 2006-03-30 at 13:15 -0500, Chris Shoemaker wrote: > What happened here? I've been seeing these printf's for quite a while > and I've been meaning to track down why the 'loaded' numbers are less > than the 'total' numbers for several data-types.
There are multiple reasons why the percentage loaded value could exceed 100%. The simplest is that a bad count value was written on output. If you were able to successfully load your data file you weren't hitting the problem I fixed. The problem I was seeing is related to the following (class of) line in the data file: <gnc:count-data cd:type="commodity">161</gnc:count-data> Gnucash writes the <gnc:count-data> tag with an attribute named 'cd:type' but doesn't declare the 'cd' namespace. (The declaration of 'cd' that you see on line 6 of the data file is in the wrong scope.) When a validating xml parser reads this attribute it on input, it ignores the attribute leaving gnucash with no idea of what the number 161 applies to. This was considered a parse error and caused the loading of the data file to be considered a failure even though all the data was read. Also since all counts to be loaded are zero, gnucash has no way to properly update the progress bar. > But why remove them? Are they invalid in some way? They're debugging that was left in by accident by yours truly a long time ago. My test data file was yielding 1,800 passes through that code, producing close to 10,000 lines of output. If you still want this output you can enable debugging for GNC_MOD_IO. David _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
