Bug 22834 - The Yahoo finance API shutdown broke perl-finance-quote - an update is required to fix Gnucash's quote fetching.
Summary: The Yahoo finance API shutdown broke perl-finance-quote - an update is requir...
Status: ASSIGNED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL: http://cpansearch.perl.org/src/ECOCOD...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-27 09:16 CEST by Edward d'Auvergne
Modified: 2018-04-18 11:23 CEST (History)
2 users (show)

See Also:
Source RPM: perl-Finance-Quote-1.380.0-3.mga6
CVE:
Status comment:


Attachments

Description Edward d'Auvergne 2018-03-27 09:16:50 CEST
Description of problem:

Yahoo shut down their finance API last year (2017), breaking perl-finance-quote.  In response, perl-finance-quote switched to AlphaVantage to remain functional, and then released version 1.39:

http://cpansearch.perl.org/src/ECOCODE/Finance-Quote-1.39/htdocs/index.html

This notably affects the quote fetching feature of Gnucash.


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

All versions below 1.39.


How reproducible:

100%


Steps to Reproduce:

To see this issue:

1. Open Gnucash.
2. Create some accounts with different currencies.
3. Select "Tools->Price editor" from the menu.
4. Click on the "Get Quotes" button.

A pop up window will appear saying "Unable to retrieve quotes for these items:... CURRENCY:EUR, CURRENCY:GBP, CURRENCY:USD, etc.".
Edward d'Auvergne 2018-03-27 09:19:21 CEST

URL: (none) => http://cpansearch.perl.org/src/ECOCODE/Finance-Quote-1.39/htdocs/index.html

Comment 1 Marja Van Waes 2018-03-27 12:59:05 CEST
Assigning to the registered perl-Finance-Quote maintainer

Btw, why do we have perl-Finance-Quote-1.380.0-3.mga6 instead of perl-Finance-Quote-1.38.0-3.mga6? Is that because of 

  Version:    %perl_convert_version %{upstream_version}

If so, why does it need to be converted like that?

Assignee: bugsquad => shlomif
CC: (none) => marja11
Source RPM: (none) => perl-Finance-Quote-1.380.0-3.mga6

Comment 2 Shlomi Fish 2018-03-27 18:39:30 CEST
(In reply to Marja van Waes from comment #1)
> Assigning to the registered perl-Finance-Quote maintainer
> 

thanks! I submitted 1.470 to 6/updates_testing.

> Btw, why do we have perl-Finance-Quote-1.380.0-3.mga6 instead of
> perl-Finance-Quote-1.38.0-3.mga6? Is that because of 
> 
>   Version:    %perl_convert_version %{upstream_version}
> 

yes.

> If so, why does it need to be converted like that?

this is because 1.38 is considered 1.380.0 in perl land.
Comment 3 Shlomi Fish 2018-04-13 19:33:28 CEST
Assigning to QA for testing.

Status: NEW => ASSIGNED
Assignee: shlomif => qa-bugs

Comment 4 Herman Viaene 2018-04-15 13:38:31 CEST
MGA6-32 on Dell Latitude D600 MATE
No installation issues.
Test before update: I have my accounts in gnucash in Euro, added another dummy in AUD, and run the test as described above. I get this error. 
Closed gnucash, installed the update and do the test again. I get the same error.
I noticed that on this test laptop I have gnucash 2.6.19( seen as stable from MCC), while on my MGA6-64 desktop I have 2.6.18, and the newer version not seen in MCC.
This desktop is fully updated (not test repo's enabled).

CC: (none) => herman.viaene

Comment 5 Edward d'Auvergne 2018-04-18 10:23:41 CEST
Can the new 1.470 package also be put into "Core Updates Testing"?  I can only see it in "Core 32bit Updates Testing", hence I assume that is why I cannot test it.  Cheers!
Comment 6 Edward d'Auvergne 2018-04-18 10:56:14 CEST
Sorry, the 32bit package works.  I followed the instructions at:

    https://wiki.gnucash.org/wiki/FAQ#Q:_Why_doesn.27t_online_quoting_work.3F

The quote fetching works after obtaining a free key according to the above, and then running:

"""
$ export ALPHAVANTAGE_API_KEY=XXXXXXXXXXXXXX
$ gnc-fq-dump alphavantage CSCO
Finance::Quote fields Gnucash uses:
    symbol: CSCO                 <=== required
      date: 04/17/2018           <=== recommended
  currency: USD                  <=== required
      last: 44.5900              <=\       
       nav:                      <=== one of these
     price:                      <=/        
  timezone:                      <=== optional
"""

Now I need to work out why it doesn't work within Gnucash 2.6.18.  The instructions to go to "Tools->Security Editor" and changing the "Quote Source Information" to "unknown: alphavantage" does nothing.  It seems like this setting cannot be saved (editing the currency a second time shows that the setting is not saved).
Comment 7 Edward d'Auvergne 2018-04-18 11:23:03 CEST
More testing shows that the following command works when gnucash is not running and allows (at least some) of the quotes to be updated:

$ gnucash --add-price-quotes /path/to/file.gnucash

After this, I also updated to gnucash 2.6.19 as found in "Core Updates Testing".  This made no difference to the "gnucash --add-price-quotes" fetching or the inability to change the currency source to alphavantage in the Security Editor.

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