Fwd: Troubles with price retrieval
Derek Atkins
warlord at MIT.EDU
Fri Dec 18 10:58:35 EST 2009
Hi,
Doug Brown <toquehead at gmail.com> writes:
> gnc-fq-dump appears to work fine to me:
>
> C:\Program Files\gnucash\bin>perl gnc-fq-dump stockhousecanada_fund cho304
> Finance::Quote fields Gnucash uses:
> symbol: cho304 <=== required
> date: 12/11/2009 <=== required
> currency: CAD <=== required
> last: 14.9602 <=\
> nav: 14.9602 <=== one of these
> price: 14.9602 <=/
> timezone: <=== optional
I'll note that this doesn't work for me. I get:
gnc-fq-dump stockhousecanada_fund cho304
Finance::Quote fields Gnucash uses:
symbol: cho304 (deduced) <=== required
date: ** missing ** <=== required
currency: ** missing ** <=== required
last: <=\
nav: <=== one of these
price: <=/
timezone: <=== optional
** This stock quote cannot be used by gnucash!!
[snip]
> C:\Program Files\gnucash\bin>perl gnc-fq-helper
> (canadastockhouse_fund "CHO304")
> Undefined fetch-method canadastockhouse_fund passed to
> Finance::Quote::fetch at gnc-fq-helper line 368
> #f
Two things:
1) you're using a different quote source here. "canadastockhouse_fund"
doesn't exist. You should be using "stockhousecanada_fund", the same as
in gnc-fq-dump.
2) the symbol/mnemonic is case-sensitive. You are passing 'cho304' to
dump but "CHO304" to helper. These are effectively DIFFERENT symbols.
When I pass the correct data to gnc-fq-helper I get:
gnc-fq-helper
(stockhousecanada_fund "cho304")
Parsing of undecoded UTF-8 will give garbage when decoding entities at /usr/lib/perl5/vendor_perl/5.10.0/Finance/Quote/StockHouseCanada.pm line 79, <> line 1.
(#f)
...which isn't all too surprising considering gnc-fq-dump fails for me.
So, make sure you're using the correct quote source name and the correct
symbol case.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-user
mailing list