[GNC] --add-price-quotes prints nothing and always fails with no info

Chris Good goodchris96 at gmail.com
Sat Jun 6 03:15:32 EDT 2020


Message: 4
Date: Fri, 5 Jun 2020 08:44:43 -0700
From: John Ralls <jralls at ceridwen.us>
To: Hong Xu <hong at topbug.net>
Cc: gnucash-user at gnucash.org
Subject: Re: [GNC] --add-price-quotes prints nothing and always fails
	with no info
Message-ID: <B97EE739-AA06-4201-828B-FA2282F5CFA8 at ceridwen.us>
Content-Type: text/plain;	charset=us-ascii



> On Jun 4, 2020, at 2:06 PM, Hong Xu <hong at topbug.net> wrote:
> 
> Hi!
> 
> I tried to play with automatic stock price retrieval, but it always failed
(although gnc-fq-dump works well).
> 
> When I run "gnucash --debug --add-price-quotes /path/to/my/gnucash/file",
I got the following output:
> 
>     Found Finance::Quote version 1.49.
> 
> Then "echo $?" prints "1".
> 
> gnc-fq-dump works well:
> 
> $ gnc-fq-dump yahoo_json AMZN
> Finance::Quote fields Gnucash uses:
>     symbol: AMZN                 <=== required
>       date: 06/04/2020           <=== recommended
>   currency: USD                  <=== required
>       last: 2460.6               <=\      
>        nav:                      <=== one of these
>      price:                      <=/       
>   timezone:                      <=== optional
> 
> Is there any way to get more debug information? My system is Debian 10,
and "gnucash -v" outputs:

By default GnuCash logs to a file: https://wiki.gnucash.org/wiki/Tracefile.

If you want the output to go to the terminal add `--logto=stderr` to the
command line.

Regards,
John Ralls

Hi Hong,

(apologies if this is not the correct way to address you)

If it works in gnc-fq-dump, but not from Get Quotes button, maybe there is a
problem with how the stock is set up in the Security Editor.
Please attach (do not paste into message) a screen dump showing the setup in
the security editor.
Note that (I think) in old versions of GnuCash, a problem with 1 stock could
cause them all to fail, so it is worthwhile unticking 'Get Quotes' on all
the securities and keep importing and ticking 'Get Quotes' on additional
securities to find the problem ones.

Regards, Chris Good




More information about the gnucash-user mailing list