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 <cleanoutmys...@gmail.com> Sent: 18 July 2021 13:55 To: david.rom...@davidjromano.com; gnucash-user@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.rom...@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&from > _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@gnucash.org > To update your subscription preferences or to unsubscribe: > https://lists.gnucash.org/mailman/listinfo/gnucash-user > If you are using Nabble or Gmane, please see 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. > _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see 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.