Bug 32957 - Many modules in perl-Finance-Quote 1.54 do not work, causing some quote fetching in Gnucash to fail.
Summary: Many modules in perl-Finance-Quote 1.54 do not work, causing some quote fetch...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2024-03-11 14:52 CET by Edward d'Auvergne
Modified: 2024-03-14 01:57 CET (History)
5 users (show)

See Also:
Source RPM: perl-Finance-Quote-1.540.0-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Edward d'Auvergne 2024-03-11 14:52:35 CET
Description of problem:

The perl-Finance-Quote package from 2022-Dec-26 is far too old to be useful.  Please update this to version 1.59.  Without updating to the newest version, fetching quotes from many sources results in error.  The broken modules have been fixed in all F::Q versions up to 1.59.  This old version is using Yahoo finance URLs for their v7 API that has been shut down (e.g. https://query1.finance.yahoo.com/v7/finance/quote?symbols=APPL).  The new version uses the new URLs (e.g. https://query1.finance.yahoo.com/v8/finance/chart/APPL).

This old F::Q version also has the Alphavantage quote bug whereby having more than 5 currencies results in only the 5 being fetched and the rest resulting in errors.  With the free version of Alphavantage, you can only have 5 API requests a minute.  So you have to wait, as F::Q version 1.59 does.


Version-Release number of selected component (if applicable):

1.54


How reproducible:

100%


Steps to Reproduce:
1.  Simply run the following Gnucash command line script:

$ gnc-fq-dump -v yahoo_json AAPL

2.  Observe the error due to the no-longer functional Yahoo finance v7 API URL, that was fixed in F::Q version 1.59.
katnatek 2024-03-12 01:51:16 CET

Assignee: bugsquad => pkg-bugs

Comment 1 David GEIGER 2024-03-12 04:41:12 CET
Assigning to QA,


Packages in 9/Core/Updates_testing:
======================
perl-Finance-Quote-1.590.0-1.mga9.noarch.rpm

From SRPMS:
perl-Finance-Quote-1.590.0-1.mga9.src.rpm

CC: (none) => geiger.david68210
Assignee: pkg-bugs => qa-bugs

Comment 2 Edward d'Auvergne 2024-03-12 09:11:14 CET
I've tested version 1.59 from "Core/Updates testing" and the Yahoo quote fetching is working again.  There is still a problem with Alphavantage quote fetching trying more than 5 a minute, causing a lot of failures, however I can report this upstream.  Thank you!
Comment 3 Edward d'Auvergne 2024-03-12 11:19:59 CET
For the record, the AlphaVantage problem (https://github.com/finance-quote/finance-quote/issues/361) can be avoided completely by setting the environmental variable "FQ_CURRENCY" to "YahooJSON".  This switches from the default of AlphaVantage, who are becoming more and more restrictive with their free quote fetching accounts, to the unlimited YahooJSON interface.
Comment 4 Herman Viaene 2024-03-12 15:16:41 CET
I have gnucash installed but gnc-like commnands not found.

CC: (none) => herman.viaene

Comment 5 katnatek 2024-03-12 19:08:57 CET
I think we need some extra steps to reproduce the issue, I try to adapt what I see https://wiki.gnucash.org/wiki/Online_Quotes to the report but need more work
Comment 6 katnatek 2024-03-12 19:10:37 CET
The current package update without issues to testing version VM mageia 9 x86_64
katnatek 2024-03-12 19:55:32 CET

CC: (none) => tarazed25

Comment 7 katnatek 2024-03-12 19:56:18 CET
Len, can you handle advisory for this report?
Comment 8 Edward d'Auvergne 2024-03-12 22:34:34 CET
Sorry, gnc-fq-dump was the old Gnucash command.  The current version uses:

$ gnucash-cli -V --quotes dump yahoo_json AAPL
Comment 9 Edward d'Auvergne 2024-03-12 22:39:33 CET
(In reply to Edward d'Auvergne from comment #8)
> Sorry, gnc-fq-dump was the old Gnucash command.  The current version uses:
> 
> $ gnucash-cli -V --quotes dump yahoo_json AAPL

For the record, the result on mga9 with F::Q v1.540 is:

$ gnucash-cli -V --quotes dump yahoo_json AAPL
Finance::Quote reported a failure for symbol AAPL: Error retrieving quote for AAPL. Attempt to fetch the URL https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL resulted in HTTP response 401 (Unauthorized)
$

And with the newer v1.590:

$ gnucash-cli -V --quotes dump yahoo_json AAPL
AAPL:
         eps => 6.43
        open => 173.15
         low => 171.02
          pe => 26.940903
        date => 03/12/2024
  year_range =>       149.92 - 199.62
        last => 173.23
    currency => USD
      method => yahoo_json
    exchange => NasdaqGS
   div_yield => 0.54992763
      symbol => AAPL
        high => 174.03
      volume => 58529744
        name => AAPL (Apple Inc.)
        type => EQUITY
     isodate => 2024-03-12
     success => 1
       close => 172.75

$
Comment 10 katnatek 2024-03-13 00:19:14 CET
(In reply to Edward d'Auvergne from comment #9)

I'll trust you because I think a configuration step is needed

LC_ALL=C gnucash-cli -V --quotes dump yahoo_json AAPL
Price retrieval failed: Failed to initialize Finance::Quote: missing_modules JSON::Parse
katnatek 2024-03-13 00:19:51 CET

CC: (none) => andrewsfarm

katnatek 2024-03-13 00:20:09 CET

Whiteboard: (none) => MGA9-64-OK

katnatek 2024-03-13 21:45:09 CET

Keywords: (none) => advisory

Comment 11 Thomas Andrews 2024-03-13 23:53:14 CET
Validating.

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 12 Mageia Robot 2024-03-14 00:15:45 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2024-0108.html

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 13 Len Lawrence 2024-03-14 00:28:36 CET
(In reply to katnatek in comment #7)

Sorry katnatek, I have been out of touch today - have only just now checked my email.
Comment 14 katnatek 2024-03-14 01:57:52 CET
(In reply to Len Lawrence from comment #13)
> (In reply to katnatek in comment #7)
> 
> Sorry katnatek, I have been out of touch today - have only just now checked
> my email.

Don't sorry, we all have lives beyond mageia
Next time

Note You need to log in before you can comment on or make changes to this bug.