That's it! That's the problem! I had forgotten that I needed to return ALL the symbols requested, not just one. (I guess I was under the impression that gnucash called the function repeatedly for each individual quote.)
Anyway, here's the script that works and I'll also try to get this into Finance::Quote official release. I think it's going to be pretty useable for anyone using gnucash in Sweden. Swedes loves mutual funds and this has long been a hurdle for me when advocating gnucash here in Sweden. Thank you for your help. /Fredrik On Sat, Nov 8, 2008 at 3:55 PM, David Reiser <[EMAIL PROTECTED]> wrote: > > On Nov 8, 2008, at 7:17 AM, Fredrik Persson wrote: > >> David, (and others) >> >> I've rewritten my Finance::Quote plugin and now it works for *some* >> quotes, but not for others. (Script attached.) >> >> The symbol "FXXIN06789" works fine. The symbols "NTJUL00779" and >> "FXIRL00109" gets the same error as before. But I see no difference >> between those results in gnc-fq-helper, or gnc-fq-dump. >> >> Any idea what could be causing this? I see no difference in the time >> stamps either. >> >> /Fredrik > > Something is wrong with your setting up or returning an array of multiple > quotes. Each of those symbols works if you only ask for one quote, but any > attempt to retrieve multiple quotes fails: > > echo '(ftest_funds "NTJUL00779" "FXXIN06789")' | gnc-fq-helper > (("NTJUL00779" (symbol . "NTJUL00779") (gnc:time-no-zone . "2008-11-04 > 12:00:00") (price . 8391.00) (currency . "EUR")) > #f) > > echo '(yahoo "IBM" "AAPL")' | gnc-fq-helper > (("IBM" (symbol . "IBM") (gnc:time-no-zone . "2008-11-07 16:02:00") (last . > 86.27) (currency . "USD")) > ("AAPL" (symbol . "AAPL") (gnc:time-no-zone . "2008-11-07 16:00:00") (last > . 98.24) (currency . "USD"))) > > Dave > -- > David Reiser > [EMAIL PROTECTED] > > > > >
Ftest.pm
Description: Perl program
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel