[GNC] Issue with Finance::Quote

Bruce Schuck bschuck at asgard-systems.com
Thu Jul 27 13:15:45 EDT 2023


On 7/27/23 10:37:17 -0400, Bernard wrote:

> Thanks for that suggestion - did that on 2 different Windows systems,
> both still fail the same way...

> C:\Program Files (x86)\gnucash\bin>gnucash-cli -Q dump alphavantage QQQ
> * 10:21:02 ERROR <gnc.price-quotes> [parse_quotesource_error()]
> Unrecognized Finance::Quote Error Can't use an undefined value as a HASH
> reference at C:/Strawberry/perl/site/lib/Finance/Quote/AlphaVantage.pm
> line 234.
> Finance::Quote retrieval failed with error Unrecognized Finance::Quote
> Error: Can't use an undefined value as a HASH reference at
> C:/Strawberry/perl/site/lib/Finance/Quote/AlphaVantage.pm line 234.

Please verify the version of Finance::Quote. On Linux:

$ perl -MFinance::Quote -e 'print "$Finance::Quote::VERSION\n"'
1.57

On Windows:

C:\Users\bschuck>perl -MFinance::Quote -e "print 
qq{{$Finance::Quote::VERSION\n}}"
{1.57
}

C:\Users\bschuck>gnucash-cli -Q dump alphavantage QQQ
Finance::Quote fields GnuCash uses:
     symbol: QQQ             <=== required
       date: 07/26/2023      <=== recommended
   currency: USD             <=== required
       last: 377.5200        <=\
        nav:                 <=== one of these
      price:                 <=/

You should also be able to execute the example perl script that comes 
with the Finance::Quote module package.

Since you are on Windows and recently installed Finance::Quote:

 > cd C:\Strawberry\cpan\build\Finance-Quote-1.57-0

C:\Strawberry\cpan\build\Finance-Quote-1.57-0>perl Examples\stockdump.pl 
alphavantage QQQ

$VAR1 = {
           'QQQ∟net' => '-1.2600',
           'QQQ∟symbol' => 'QQQ',
           'QQQ∟success' => 1,
           'QQQ∟currency' => 'USD',
           'QQQ∟currency_set_by_fq' => 1,
           'QQQ∟date' => '07/26/2023',
           'QQQ∟volume' => '47075710',
           'QQQ∟method' => 'alphavantage',
           'QQQ∟open' => '377.7200',
           'QQQ∟p_change' => '-0.3326',
           'QQQ∟close' => '378.7800',
           'QQQ∟last' => '377.5200',
           'QQQ∟low' => '375.1800',
           'QQQ∟isodate' => '2023-07-26',
           'QQQ∟high' => '379.2400'
         };
C:\Strawberry\cpan\build\Finance-Quote-1.57-0>

Bruce S.


More information about the gnucash-user mailing list