[GNC] Can anyone help with this issue please - GNC-FQ Not able to collect data

david.romano at davidjromano.com david.romano at davidjromano.com
Mon Jul 19 08:17:30 EDT 2021


Thanks Geoff - I thought you were west of me (London time) not east!

I'll try to work out how to downgrade.

-----Original Message-----
From: Geoff <cleanoutmyshed at gmail.com> 
Sent: 19 July 2021 13:12
To: david.romano at davidjromano.com; gnucash-user at gnucash.org
Subject: Re: [GNC] Can anyone help with this issue please - GNC-FQ Not able to collect data

OK, I have been testing using Finance::Quote version 1.49.  As a
*workaround* you could try downgrading to that version?

It is getting late here, I'll try and upgrade to a later version of Finance::Quote and see if I can reproduce your problem later this week.

Meantime someone else may have a suggestion.

Regards

Geoff
=====

On 19/07/2021 10:04 pm, david.romano at davidjromano.com wrote:
> I think your right - does not look good - no output at all
> 
> C:\Program Files (x86)\gnucash\bin>perl -MFinance::Quote -e "my $q = Finance::Quote->new(); print $q->currency(q/USD/,q/GBP/);"
> 
> C:\Program Files (x86)\gnucash\bin>
> 
> Best regards,
> 
> David Romano,
> 
> UK Direct line: +44 (0) 23 9234 1647
> UK Mobile & WhatsApp: +44 (0) 79 4830 8868 Skype Video Call: 
> David.J.Romano
> 
> -----Original Message-----
> From: Geoff <cleanoutmyshed at gmail.com>
> Sent: 19 July 2021 13:01
> To: david.romano at davidjromano.com; gnucash-user at gnucash.org
> Subject: Re: [GNC] Can anyone help with this issue please - GNC-FQ Not 
> able to collect data
> 
> Hmmm, something is definitely broken there.
> 
> Let me know what you get with my second email.
> 
> Geoff
> =====
> 
> On 19/07/2021 9:57 pm, david.romano at davidjromano.com wrote:
>> Sorry Geoff, I was pasting from my troubleshooting notes not what I typed.
>>
>> I’ve attached the screenshot
>>
>> Best regards,
>>
>> David Romano,
>>
>> UK Direct line: +44 (0) 23 9234 1647
>>
>> UK Mobile & WhatsApp: +44 (0) 79 4830 8868
>>
>> Skype Video Call: David.J.Romano
>>
>> -----Original Message-----
>> From: Geoff <cleanoutmyshed at gmail.com>
>> Sent: 19 July 2021 12:41
>> To: david.romano at davidjromano.com; gnucash-user at gnucash.org
>> Subject: Re: [GNC] Can anyone help with this issue please - GNC-FQ 
>> Not able to collect data
>>
>> Hi David
>>
>> This problem is because you are pasting not just the command itself, 
>> but also its expected output.
>>
>> This is the command:
>>
>> echo (currency "USD" "GBP") | perl gnc-fq-helper
>>
>> And this is the expected output:
>>
>> (("USD" (symbol . "USD") (gnc:time-no-zone . "2021-07-19 21:27:37") 
>> (last . #e0.72922) (currency . "GBP")))
>>
>> See attached screenshot.
>>
>> Hope this helps.
>>
>> Regards
>>
>> Geoff
>>
>> =====
>>
>> On 19/07/2021 7:08 pm, david.romano at davidjromano.com 
>> <mailto:david.romano at davidjromano.com> wrote:
>>
>>   > Good morning Geoff - I'm now back in the office and have run 
>> through your
>>
>>   > suggestions with the following result:
>>
>>   >
>>
>>   >
>>
>>   >             a) C:\Program Files (x86)\gnucash\bin>set
>>
>>   > ALPHAVANTAGE_API_KEY=[MYKEY]
>>
>>   >
>>
>>   >                             > LOOKS OK
>>
>>   >
>>
>>   >             b) C:\Program Files (x86)\gnucash\bin>echo
>> %ALPHAVANTAGE_API_KEY%
>>
>>   > [MYKEY]
>>
>>   >
>>
>>   >                             > RETURNS KEY CORRECTLY
>>
>>   >
>>
>>   >             c) C:\Program Files (x86)\gnucash\bin>echo (currency
>> "USD" "GBP") |
>>
>>   > perl gnc-fq-helper (("USD" (symbol . "USD") (gnc:time-no-zone .
>> "2021-03-10
>>
>>   > 08:40:01") (last . #e0.72002) (currency . "GBP")))
>>
>>   >
>>
>>   >                             > RETURNS ERROR STRING:
>>
>>   >
>>
>>   >                             C:\Program Files (x86)\gnucash\bin>echo
>> (currency "USD"
>>
>>   > "GBP") | perl gnc-fq-helper (("USD" (symbol . "USD") (gnc:time-no-zone .
>>
>>   > "2021-03-10 08:40:01") (last . #e0.72002) (currency . "GBP")))
>>
>>   >
>>
>>   >                                             Can't open ((USD: No
>> such file or directory at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open (symbol: No
>> such file or directory at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't do inplace edit: .
>> is not a regular file at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open USD): No
>> such file or directory at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open
>> (gnc:time-no-zone: No such file or
>>
>>   > directory at gnc-fq-helper line 331.
>>
>>   >                                             Can't do inplace edit: .
>> is not a regular file at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open 2021-03-10
>> 08:40:01): Invalid argument at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open (last: No
>> such file or directory at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't do inplace edit: .
>> is not a regular file at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open #e0.72002):
>> No such file or directory at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open (currency:
>> No such file or directory at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't do inplace edit: .
>> is not a regular file at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >                                             Can't open GBP))): No
>> such file or directory at
>>
>>   > gnc-fq-helper line 331.
>>
>>   >
>>
>>   > Unfortunately I'm not a PERL coder but the code block starting at 
>> line 331
>>
>>   > is the following:
>>
>>   >
>>
>>   >             while(<>) {
>>
>>   >
>>
>>   >               my $result = parse_input_line($_);
>>
>>   >
>>
>>   >               if(!$result) {
>>
>>   >                print STDERR "$prgnam: bad input line ($_)\n";
>>
>>   >                 exit 1;
>>
>>   >    }
>>
>>   >
>>
>>   >
>>
>>   > -----Original Message-----
>>
>>   > From: Geoff <cleanoutmyshed at gmail.com 
>> <mailto:cleanoutmyshed at gmail.com>>
>>
>>   > Sent: 18 July 2021 13:55
>>
>>   > To: david.romano at davidjromano.com 
>> <mailto:david.romano at davidjromano.com>; gnucash-user at gnucash.org 
>> <mailto:gnucash-user at gnucash.org>
>>
>>   > Subject: Re: [GNC] Can anyone help with this issue please - 
>> GNC-FQ Not able
>>
>>   > to collect data
>>
>>   >
>>
>>   > Hi David
>>
>>   >
>>
>>   > Did you remember to set your alphavantage key as an environment 
>> variable
>>
>>   > when testing with Perl from the command line?
>>
>>   >
>>
>>   > Can you try this:
>>
>>   >
>>
>>   > C:\Program Files (x86)\gnucash\bin>set
>>
>>   > ALPHAVANTAGE_API_KEY=__Your_Actual_Key__
>>
>>   >
>>
>>   > C:\Program Files (x86)\gnucash\bin>echo %ALPHAVANTAGE_API_KEY%
>>
>>   > __Your_Actual_Key__
>>
>>   >
>>
>>   > C:\Program Files (x86)\gnucash\bin>echo (currency "USD" "GBP") | 
>> perl
>>
>>   > gnc-fq-helper (("USD" (symbol . "USD") (gnc:time-no-zone .
>> "2021-03-10
>>
>>   > 08:40:01") (last . #e0.72002) (currency . "GBP")))
>>
>>   >
>>
>>   > C:\Program Files (x86)\gnucash\bin>echo (currency "EUR" "RON") | 
>> perl
>>
>>   > gnc-fq-helper (("EUR" (symbol . "EUR") (gnc:time-no-zone .
>> "2021-03-10
>>
>>   > 08:45:05") (last . #e4.8841) (currency . "RON")))
>>
>>   >
>>
>>   >
>>
>>   > Also, it is normal to get the blank command window when doing Get 
>> Quotes on
>>
>>   > Windows.
>>
>>   >
>>
>>   > Regards
>>
>>   >
>>
>>   > Geoff
>>
>>   > =====
>>
>>   >
>>
>>   > On 18/07/2021 8:04 pm, david.romano at davidjromano.com 
>> <mailto:david.romano at davidjromano.com> wrote:
>>
>>   >> I'm having a problem with GNC-FQ not being able to retrieve 
>> currency
>>
>>   >> data for the GBP / EUR currency pair.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> I had previously used FQ back when the data source was Yahoo, 
>> but when
>>
>>   >> the Yahoo died I stopped using it.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> I now need to pick up GBP and EUR rates so I've installed the
>>
>>   >> components required to get the Alphavantage feed to work - or so 
>> I hoped!
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> Here's where I've got to so far:
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> 1.      I updated GNU Cash to current 4.6.
>>
>>   >> 2.      I installed Strawberry Perl version 5.32.1.1
>>
>>   >> 3.      I'm Running Windows 10 Professional 21H1 build 19043.110
>>
>>   >> 4.      I added my aphhavantage key in Preferences \ Online Quotes
>>
>>   >> 5.      I ran perl gnc-fq-check and got the following result:
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> C:\Program Files (x86)\gnucash\bin>perl gnc-fq-check
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> ("1.51" "aex" "alphavantage" "amfiindia" "asegr" "asx" "aufunds"
>>
>>   > "australia"
>>
>>   >> "bamosz" "bet" "bloomberg" "bourso" "bse" "bseindia" "canada"
>>
>>   > "canadamutual"
>>
>>   >> "comdirect" "cse" "deka" "dutch" "dwsfunds" "europe"
>>
>>   > "fetch_live_currencies"
>>
>>   >> "fidelity" "fidelity_direct" "finanzpartner" "fondsweb" "fool" "ftfunds"
>>
>>   >> "fundata" "fundlibrary" "goldmoney" "greece" "hu" "hufund" "hungary"
>>
>>   >> "hustock" "iexcloud" "india" "indiamutual" "known_currencies"
>>
>>   >> "morningstarau" "morningstarjp" "mstaruk" "nasdaq" "nseindia" "nyse"
>> "nzx"
>>
>>   >> "onvista" "oslobors" "romania" "seb_funds" "six" "tiaacref" "tmx"
>>
>>   >> "tradeville" "troweprice" "troweprice_direct" "tsp" "ukfunds"
>> "unionfunds"
>>
>>   >> "usa" "usfedbonds" "yahoo_json" "za")
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> 6.      I ran perl gnc-fq-update and got the following result:
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> C:\Program Files (x86)\gnucash\bin>perl gnc-fq-update
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> Database was generated on Sat, 17 Jul 2021 11:42:13 GMT
>>
>>   >>
>>
>>   >> Date::Manip is up to date (6.85).
>>
>>   >>
>>
>>   >> Finance::Quote is up to date (1.51).
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> 7.      I tested the alphavantage data feed using this URL string
>> and got
>>
>>   >> the following result:
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >>
>> https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&fro
>> m 
>> <https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&fr
>> o
>> m>
>>
>>   >> _curre ncy=GBP&to_currency=EUR&apikey=[MYKEY}
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> Realtime Currency Exchange Rate
>>
>>   >>
>>
>>   >> 1. From_Currency Code       "GBP"
>>
>>   >>
>>
>>   >> 2. From_Currency Name      "British Pound Sterling"
>>
>>   >>
>>
>>   >> 3. To_Currency Code  "EUR"
>>
>>   >>
>>
>>   >> 4. To_Currency Name "Euro"
>>
>>   >>
>>
>>   >> 5. Exchange Rate       "1.16550000"
>>
>>   >>
>>
>>   >> 6. Last Refreshed       "2021-07-18 09:00:04"
>>
>>   >>
>>
>>   >> 7. Time Zone    "UTC"
>>
>>   >>
>>
>>   >> 8. Bid Price       "1.16544000"
>>
>>   >>
>>
>>   >> 9. Ask Price       "1.16555000"
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> All looked good so I set the two currencies GBP and EUR to get 
>> online
>>
>>   >> quotes in the Security Editor.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> I then switched to the Price Database and clicked Get Quotes 
>> only to
>>
>>   >> get the following failure message:
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> Interestingly, when I click the Get Quotes button (and when I 
>> open GNU
>>
>>   >> Cash) Perl pops a blank CMD window
>> (C:Strawbery\perl\bin\perl.exe)
>>
>>   >> and the window closes without being populated.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> I then created a new alphavantage key which I updated in GNC
>>
>>   >> preferences, but I got the same result when I ran Get Quotes.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> I next tried the following code example:
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> cd \Program Files (x86)\gnucash\bin
>>
>>   >>
>>
>>   >> set ALPHAVANTAGE_API_KEY=[MYKEY]
>>
>>   >>
>>
>>   >> perl gnc-fq-dump alphavantage CSCO
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> Which generated the following output:
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> C:\Program Files (x86)\gnucash\bin>perl gnc-fq-dump alphavantage 
>> EUR
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> syswrite() on unopened filehandle GEN0 at
>>
>>   >> C:/Strawberry/perl/lib/IO/Handle.pm line 459.
>>
>>   >>
>>
>>   >> Finance::Quote fields Gnucash uses:
>>
>>   >>
>>
>>   >>       symbol: EUR (deduced)        <=== required
>>
>>   >>
>>
>>   >>       date: ** missing **        <=== recommended
>>
>>   >>
>>
>>   >>      currency: ** missing **        <=== required
>>
>>   >>
>>
>>   >>       last: **missing**          <=\
>>
>>   >>
>>
>>   >>       nav: **missing**          <=== one of these
>>
>>   >>
>>
>>   >>       price: **missing**          <=/
>>
>>   >>
>>
>>   >>      timezone:                      <=== optional
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> My immediate thought was that either GNC or PERL were being 
>> blocked by
>>
>>   >> Win
>>
>>   >> 10 security so I explicitly added both Perl Interpreter and GNC 
>> to the
>>
>>   >> apps allowed through Windows Firewall - both private and public.
>> This
>>
>>   >> made no difference.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> I then wondered if the problem was IP blocking so tried again 
>> over a
>>
>>   >> VPN, thus a different IP. This made no difference.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> I'm not a Perl programmer so I'm now pretty much stuck. Possibly 
>> I've
>>
>>   >> missed something very obvious or else there is something strange 
>> going
>>
>>   >> on here which I don't understand.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> If anyone can suggest how to diagnose the issue from here, or 
>> better
>>
>>   >> still fix the issue, I'd very much appreciate the help.
>>
>>   >>
>>
>>   >>
>>
>>   >>
>>
>>   >> _______________________________________________
>>
>>   >> gnucash-user mailing list
>>
>>   >> gnucash-user at gnucash.org <mailto:gnucash-user at gnucash.org>
>>
>>   >> To update your subscription preferences or to unsubscribe:
>>
>>   >> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> <https://lists.gnucash.org/mailman/listinfo/gnucash-user>
>>
>>   >> If you are using Nabble or Gmane, please see
>>
>>   > https://wiki.gnucash.org/wiki/Mailing_Lists
>> <https://wiki.gnucash.org/wiki/Mailing_Lists> for more information.
>>
>>   >> -----
>>
>>   >> 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