Importing QIF files
John Ralls
jralls at ceridwen.us
Mon Feb 2 10:12:09 EST 2015
> On Feb 2, 2015, at 3:21 AM, Mark Wigmore <mawigmore at gmail.com> wrote:
>
> On 2 February 2015 at 10:56, Mark Wigmore <mawigmore at gmail.com> wrote:
>
>>
>> I'll continue the 'divide and conquer' approach! Thanks,
>>
>
> OK, got a bit further this time. The following from the tracefile:
>
> 904: 29 [string=? "NatWest VISA" #f]
> C:\Program Files
> (x86)\gnucash\share\gnucash/scm/qif-import/qif-to-gnc.scm:904:16: In
> procedure string= in expression (string=? (qif-xtn:from-acct #)
> far-acct-name):
> C:\Program Files
> (x86)\gnucash\share\gnucash/scm/qif-import/qif-to-gnc.scm:904:16: Wrong
> type argument in position 2 (expecting string): #f
>
> Any ideas what this means please?
It means that the procedure string=? is expecting two strings to compare and instead got a string and a boolean value.
The whole snippet is
;; this is the grind loop. Go over every unmarked transaction in
;; the candidate-xtns list.
(let xtn-loop ((xtns candidate-xtns))
(if (and (not (qif-xtn:mark (car xtns)))
(string=? (qif-xtn:from-acct (car xtns)) far-acct-name))
The reason for the failure can be determined from the nearby code: far-acct-name is initialized to #f and only reset to a valid value if the transaction is a bank transaction, meaning that a separate function gif-xtn:security-name has returned false.
IIRC the QIF importer is only capable of handling basic bank account transactions, not security trades.
Regards,
John Ralls
More information about the gnucash-user
mailing list