[GNC] Finance Quote problem MacOS High Sierra.

Bruce Schuck bschuck at asgard-systems.com
Tue Mar 21 19:31:22 EDT 2023


I hate to say this, but it works fine on my Mac OSX 10.15.7 (Catalina).

bruce.schuck at Bruces-MacBook-Pro-2 F5 % sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H2026

bruce.schuck at Bruces-MacBook-Pro-2 ~ % gnc-fq-check
("1.54" "aex" ...

bruce.schuck at Bruces-MacBook-Pro-2 F5 % gnc-fq-dump -v currency EUR USD
1 EUR = 1.077354 USD

bruce.schuck at Bruces-MacBook-Pro-2 F5 % gnc-fq-dump -v currency USD EUR
1 USD = 0.9282 EUR

I also do not have access to a 10.14 system/VM.

FYI - there is a bug in AlphaVantage's check for an API key. Almost any 
strings works as their "free" key (just don't use "demo").

- Bruce S.

On 3/21/23 4:05 PM, John Ralls wrote:
> It works for me on macOS 11 and later and fails on 10.14 and earlier; Murugan reported on https://bugs.gnucash.org/show_bug.cgi?id=798794 that they're using 10.15, so I guess that's the cutoff. I don't have a 10.15 machine or VM to test on.
> 
> It demonstrates with the Examples/currency_rates.pl I pointed GR at earlier so it's something in Finance::Quote. I've been salting that with print statements to try to figure out what's going on and it seems to be failing to load the AlphaVantage currency module at Quote.pm line 421: A print before that line prints and one immediately after doesn't. At line 805 `$this->{currency_rate_method}` is empty so no attempt to get quotes is made.
> 
> It seems strange that this would have come up now. Could it be that nobody has tried this on an older Mac in a long time?
> 
> Regards,
> John Ralls
> 
> 
>> On Mar 21, 2023, at 3:27 PM, David H <hellvee at gmail.com> wrote:
>>
>> Murugan,
>>
>> Same popsitive results on macOS Ventura 13.2.1 with F/Q 1.54-0
>>
>> Cheers David H.
>>
>>
>> On Wed, 22 Mar 2023 at 05:49, David H <hellvee at gmail.com> wrote:
>> Murugan,
>>
>> I'm not seeing any issues on macOS Big Sur version 11.7.4 and I think my Intel MacBook Pro was OK - will double check later and confirm whether that is the case.  Also the same command works on Win 11 when formatted correctly :-)  None of the tests I ran required a valid AlphaVantage api key, a single x was all that was required.
>>
>> ALPHAVANTAGE_API_KEY=xxxx .cpan/build/Finance-Quote-1.54-0/Examples/currency-lookup.pl EUR USD
>> EUR->USD = 1.0766
>>
>>
>> ALPHAVANTAGE_API_KEY=x /Applications/Gnucash/Gnucash.app/Contents/Resources/bin/gnc-fq-dump -v currency EUR USD
>> 1 EUR = 1.07678 USD
>>
>> Cheers David H.
>>
>>
>> On Wed, 22 Mar 2023 at 01:18, Murugan Muruganandam <m.muruganandam at hotmail.com> wrote:
>> I fired up my old macbook pro and installed the Finance quote 1.54
>>
>>
>>    1.  i go the same issue of 1 EUR = <unknown> USD gnc-fq-dump currency EUR USD
>>    2.  Since i run on windows i tried the same command in Windows and it brought back 1 EUR = 1.0779347 USD. (by the way i saw a comment on windows, i have been using it for years and it works for me)
>>    3.   I checked using gnc-fq-dump  yahoo_json USDEUR=X and got the exact result
>>    4.  gnc-fq-dump  yahoo_json EURUSD=X
>> Finance::Quote fields Gnucash uses:
>>      symbol: EURUSD=X             <=== required
>>        date: 03/21/2023           <=== recommended
>>    currency: USD                  <=== required
>>        last: 1.0779347            <=\
>>
>> i checked if alphavantage was able to get me stock quote in Macbook and voila it worked perfectly
>>
>> gnc-fq-dump alphavantage IBM
>> Finance::Quote fields Gnucash uses:
>>      symbol: IBM                  <=== required
>>        date: 03/20/2023           <=== recommended
>>    currency: USD                  <=== required
>>        last: 125.9400             <=\
>>         nav:                      <=== one of these
>>
>>
>> so looks like the issue is particular to currency rates in mac.  I will raise a bug report
>>
>>
>> Saludos Cordiales
>>
>>
>> Murugan
>>
>> ________________________________
>> From: gnucash-user <gnucash-user-bounces+m.muruganandam=hotmail.com at gnucash.org> on behalf of John Ralls <jralls at ceridwen.us>
>> Sent: Tuesday, March 21, 2023 12:52 AM
>> To: G R Hewitt <hewittgr at gmail.com>
>> Cc: GNU Cash User <gnucash-user at gnucash.org>
>> Subject: Re: [GNC] Finance Quote problem MacOS High Sierra.
>>
>> Please remember to copy the list on all replies.
>>
>> No, what's expected is what I just got,
>> 1 EUR = 1.072271 USD
>> so something is still not right with your F::Q installation.
>>
>> You should have a .cpan folder (the . hides it from Finder but you can say `ls ~/.cpan` on the command line to see if it's there), and so you should be able to run
>>
>> ALPHAVANTAGE_API_KEY=xxxx .cpan/build/Finance-Quote-1.54-0/Examples/currency-lookup.pl EUR USD
>>
>> which should print EUR->USD = 1.072386
>>
>> but may say "Urgh!  Nothing back\n" instead. Unfortunately I don't think it will do much for diagnostics beyond that.
>>
>> Regards,
>> John Ralls
>>
>>> On Mar 20, 2023, at 10:15 AM, G R Hewitt <hewittgr at gmail.com> wrote:
>>>
>>> Hi John,
>>> Ha ha, you got me there, no I didn't, and should have.
>>> I now get:
>>> 1 EUR = <unknown> USD
>>> Is that what is expected?
>>>
>>> Oddly enough, I was being lazy and tried to paste the code over the highlighted 'xxxx' and terminal wasn't having it and put it at the end of the line,
>>> which, went sent, returned the same as the above but with my API code appended to USA.
>>>
>>> Just for fun, I sent your original code with the 'xxxxx' intact, and still got:
>>> 1 EUR = <unknown> USD.
>>>
>>> Puzzling.
>>>
>>>
>>> On Mon, 20 Mar 2023 at 16:12, john <jralls at ceridwen.us> wrote:
>>> Did you do the obvious (to me anyway) replacement of xxxx in the example with your key?
>>>
>>> Regards,
>>> John Ralls
>>>
>>>> On Mar 20, 2023, at 12:58 AM, G R Hewitt <hewittgr at gmail.com> wrote:
>>>>
>>>> Hi John,
>>>> I get this:
>>>> ERROR: ALPHAVANTAGE_API_KEY *must* be set for currency quotes and
>>>> stock quotes with source 'alphavantage' or 'vanguard'; see
>>>>   https://wiki.gnucash.org/wiki/Online_Quotes#Source_Alphavantage.2C_US
>>>>
>>>> Thanks
>>>>
>>>> On Sun, 19 Mar 2023 at 22:22, John Ralls <jralls at ceridwen.us> wrote:
>>>> What results when you try from the command line, e.g.
>>>>    ALPHAVANTAGE_API_KEY=xxxx /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump -v currency EUR USD
>>>> ?
>>>>
>>>> Regards,
>>>> John Ralls
>>>>
>>>>
>>>>
>>>>
>>>>> On Mar 19, 2023, at 3:17 PM, G R Hewitt <hewittgr at gmail.com> wrote:
>>>>>
>>>>> Hi John,
>>>>> Thanks for getting back.
>>>>> Yes I do, and I just checked, it is still there.
>>>>>
>>>>>
>>>>> On Sun, 19 Mar 2023 at 22:15, John Ralls <jralls at ceridwen.us> wrote:
>>>>> Do you have an alphavantage api key?
>>>>>
>>>>> Regards,
>>>>> John Ralls
>>>>>
>>>>>
>>>>>> On Mar 19, 2023, at 2:50 PM, G R Hewitt <hewittgr at gmail.com> wrote:
>>>>>>
>>>>>> Hello everyone,
>>>>>> Gnucash 4.13
>>>>>> Finance Quote 1.54
>>>>>> MacPro 2010 High Sierra
>>>>>> iMac 2017 Ventura
>>>>>>
>>>>>> After hours of much aggravation - don't ask ' I eventually got Finance
>>>>>> Quote 1.54 to install, the 'Get Quotes' button was active and I was well
>>>>>> pleased with myself.
>>>>>>
>>>>>> Anyway, on pressing it I got the dismaying message:
>>>>>> 'Unable to retrieve quotes for these items: CURRENCY:EUR'
>>>>>>
>>>>>> I have searched for answers and found none.
>>>>>>
>>>>>> Can anyone point me in the right direction, please to solving this.
>>>>>>
>>>>>> Thanks in advance.
>>>>>> _______________________________________________
>>>>>> gnucash-user mailing list
>>>>>> gnucash-user at gnucash.org
>>>>>> To update your subscription preferences or to unsubscribe:
>>>>>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>>>>>> -----
>>>>>> Please remember to CC this list on all your replies.
>>>>>> You can do this by using Reply-To-List or Reply-All.
>>>>>
>>
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
> 



More information about the gnucash-user mailing list