[GNC] Finance::Quote 1.56_02 Available for Evaluation

Kalpesh Patel kalpesh.patel at usa.net
Thu Jun 22 18:28:39 EDT 2023


My apologies all around, Bruce (I am a subscriber to finance-quote-user):

I was hoping to spare version chase and try to get to where the problem is myself before possibly sending anyone on a wild rabbit hole. Here is the detail if it helps in anyway:

- Windows 11
- Strawberry Perl version 5.28 with F::Q 1.56_02
- GnuCash 4.14

I am testing it on GNC Build ID: 4.14+(2023-03-25) at the moment though (should there be a call difference from GNC 4.X vs 5.X?). I installed the Perl module using CPAN module like this:

perl -MCPAN -e shell
install 'BPSCHUCK/Finance-Quote-1.56_02.tar.gz'

-- start of output from console --

Microsoft Windows [Version 10.0.22621.1848]
(c) Microsoft Corporation. All rights reserved.

C:\Users\kalpesh>ver

Microsoft Windows [Version 10.0.22621.1848]

C:\Users\kalpesh>perl -v

This is perl 5, version 28, subversion 1 (v5.28.1) built for MSWin32-x86-multi-thread-64int

Copyright 1987-2018, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.


C:\Users\kalpesh>where perl
C:\Strawberry\perl\bin\perl.exe

C:\Users\kalpesh>perl -MFinance::Quote -le "print $Finance::Quote::VERSION"
1.56_02

C:\Users\kalpesh>

-- end of output from console --





-----Original Message-----
From: Bruce Schuck <bschuck at asgard-systems.com> 
Sent: Thursday, June 22, 2023 3:40 PM
To: gnucash-user at gnucash.org
Cc: Kalpesh Patel <kalpesh.patel at usa.net>
Subject: Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

On 6/22/23 9:16 -0400, Kalpesh Patel" <kalpesh.patel at usa.net> wrote:

> I was using this release in a prod like env (on my own real live files 
> in an non-business use case) and seem to be getting unknown error in 
> calls from GNC since last night. What is the best way to go about 
> debugging this? Precise (un-helpful) error message is:

> There was an unknown error while retrieving the price quotes.

> Other than two securities using AlphaVantage as the source they all 
> use Yahoo JSON as the source.

Kalpesh,

First order of business, it's always helpful to include OS info and GnuCash version in addition to the F::Q version. Even better, the version of Perl as well (output of "perl -v" or "perl -V").

But from my quick tests, this looks like some odd issue with GnuCash, at least in Gnucash v5.1 build 5.1+(2023-04-30).

On my Windows 10 VirtualBox system I opened the command prompt and changed directory to the CPAN build directory for F::Q v1.56_02. Then executed F::Q's own example program. Using yahoo_json and the new yahooweb as the source method.

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>perl
Examples\stockdump.pl yahoo_json AAPL
$VAR1 = {
           'AAPL∟low' => '183.67',
           'AAPL∟last' => '186.4784',
           'AAPL∟year_range' => '      124.17 - 186.99',
           'AAPL∟open' => '183.74',
           'AAPL∟currency' => 'USD',
           'AAPL∟isodate' => '2023-06-22',
           'AAPL∟high' => '186.73',
           'AAPL∟eps' => '5.9',
           'AAPL∟pe' => '31.606506',
           'AAPL∟close' => '183.96',
           'AAPL∟date' => '06/22/2023',
           'AAPL∟div_yield' => '0.500108700000001',
           'AAPL∟volume' => 34407477,
           'AAPL∟name' => 'AAPL (Apple Inc.)',
           'AAPL∟method' => 'yahoo_json',
           'AAPL∟success' => 1,
           'AAPL∟exchange' => 'Sourced from Yahoo Finance (as JSON)',
           'AAPL∟type' => 'EQUITY',
           'AAPL∟symbol' => 'AAPL'
         };

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0> perl Examples\stockdump.pl yahooweb AAPL
$VAR1 = {
           'AAPL∟date' => '06/22/2023',
           'AAPL∟currency' => 'USD',
           'AAPL∟last' => '186.49',
           'AAPL∟isodate' => '2023-06-22',
           'AAPL∟success' => 1,
           'AAPL∟symbol' => 'AAPL',
           'AAPL∟method' => 'yahooweb',
           'AAPL∟name' => 'Apple Inc.',
           'AAPL∟exchange' => 'NasdaqGS - NasdaqGS Real Time Price'
         };

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>

Both worked fine. As well as using the GnuCash CLI.

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>gnucash-cli --verbose --quotes dump yahoo_json AAPL
AAPL:
       volume => 36019308
      success => 1
         date => 06/22/2023
         open => 183.74
         high => 186.73
         last => 186.4601
          low => 183.67
     exchange => Sourced from Yahoo Finance (as JSON)
         name => AAPL (Apple Inc.)
    div_yield => 0.500108700000001
        close => 183.96
         type => EQUITY
     currency => USD
       symbol => AAPL
   year_range =>       124.17 - 186.99
       method => yahoo_json
      isodate => 2023-06-22
           pe => 31.603407
          eps => 5.9


C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>gnucash-cli --verbose 
--quotes dump yahooweb AAPL
AAPL:
         date => 06/22/2023
     currency => USD
       symbol => AAPL
         name => Apple Inc.
     exchange => NasdaqGS - NasdaqGS Real Time Price
       method => yahooweb
         last => 186.45
      success => 1
      isodate => 2023-06-22


C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>

Thank you.

Bruce S.

P.S. - When replying to all, please remove mailing lists that you are 
not subscribed to from the recipients (in your case it was 
finance-quote-devel and finance-quote-user, but you are not the only 
guilty party).



More information about the gnucash-user mailing list