[GNC] "No quotes retrieved. Finance::Quote isn't installed properly.", but it is (macOS)

Jim DeLaHunt list+gnucash at jdlh.com
Tue Jul 9 21:22:38 EDT 2019


Hello, Gnucash users:

I am using Gnucash 3.6-1 on macOS 10.11.6. I would like to run it daily 
from a cron job to add price quotes. Finance::Quote is installed and 
updated. When running the app GUI, I can get quotes from the Price 
Database window. I have an alphavantage API key stored in the 
Preferences. However, when I run Gnucash from the command line, I get an 
error message.

% /Applications/Gnucash.app/Contents/MacOS/Gnucash --debug --extra --add-price-quotes ...path/to/ledger.gnucash
Application Path /Applications/Gnucash.app/Contents/MacOS/Gnucash

(process:94006): gnc.gui-WARNING **: 11:43:45.881: [mac_set_languages()] Language list: en:C:ja:de:zh_CN:zh_TW
The locale defined in the environment isn't supported. Falling back to the 'C' (US English) locale
No quotes retrieved. Finance::Quote isn't installed properly.

(Path to my file anonymised. Let's ignore the locale error messages, I 
think that is a separate issue.)

The crucial error message appears to be:

    No quotes retrieved. Finance::Quote isn't installed properly.

However, I can't imagine that's correct. Finance::Quote works when the 
GUI is running, and with the gnc-fq-* tools.

The resulting gnucash.trace is 1160 characters, 10 lines long. It 
doesn't say anything about Finance::Quote, but I can post it if helpful.

However, this works:

% /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-check
("1.49" "adig" "aex" "aiahk" "alphavantage" "amfiindia" "asegr" "asx" "aufunds" "australia" "bamosz" "bet"
"bmonesbittburns" "bourso" "bse" "bsero" "canada" "canadamutual" "citywire" "cominvest" "cse" "deka" "dutch"
"dwsfunds" "europe" "fetch_live_currencies" "fidelity" "fidelity_direct" "fidelityfixed" "financecanada"
"finanzpartner" "finland" "fool" "france" "ftfunds" "ftportfolios" "ftportfolios_direct" "fundlibrary"
"goldmoney" "greece" "hex" "hu" "hufund" "hungary" "hustock" "iexcloud" "indiamutual" "known_currencies"
"lerevenu" "maninv" "morningstar" "morningstarau" "morningstarch" "morningstarjp" "mstaruk" "nasdaq"
"nyse" "nz" "nzx" "platinum" "romania" "seb_funds" "sixfunds" "sixshares" "stockhousecanada_fund" "tdefunds"
"tdwaterhouse" "tiaacref" "tnetuk" "troweprice" "troweprice_direct" "trustnet" "tsp" "tsx" "uk_unit_trusts"
"ukfunds" "unionfunds" "usa" "usfedbonds" "vanguard" "vwd" "yahoo_json" "yahoo_yql" "za" "za_unittrusts")

% ALPHAVANTAGE_API_KEY=#### /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump alphavantage CSCO
Finance::Quote fields Gnucash uses:
     symbol: CSCO                 <=== required
       date: 07/09/2019           <=== recommended
   currency: USD                  <=== required
       last: 56.3400              <=\
        nav:                      <=== one of these
      price:                      <=/
   timezone:                      <=== optional

I looked for past mailing list discussions of this error message. I 
found only two:
/Finance::Quote install problem with OSX/ 
<http://gnucash.1415818.n4.nabble.com/Finance-Quote-install-problem-with-OSX-tt4665818.html>, 
Nov 28, 2013, no substantive reply.
Problem installing Finance::Quote 
<http://gnucash.1415818.n4.nabble.com/Problem-installing-Finance-Quote-tt1426573.html#a1426581>, 
Dec 18, 2009, which culminates in the John Ralls replying,

    If they both work, then the problem is likely because gnucash
    doesn't like being run with --add-price-quotes from the command line
    on a mac. Try opening Gnucash from Finder like a normal mac user,
    and update your prices with the Get Qutes button inTools>Price Editor.

Is it still accurate, 10 years later, that "gnucash doesn't like being 
run with --add-price-quotes from the command line on a mac"? If so, then 
I think there ought to be a) a bug report on the problem, and b) a wiki 
note about this in <https://wiki.gnucash.org/wiki/Online_Quotes>.

By the way, reading that 2009 thread, I pause to admire stalwart helpers 
like John Ralls and Derek Atkins, who were answering Gnucash questions 
10 years ago, and are still helping today. Thank you!

Thank you in advance for any assistance in diagnosing this.
       —Jim DeLaHunt, Vancouver, Canada

-- 
     --Jim DeLaHunt, jdlh at jdlh.com     http://blog.jdlh.com/ (http://jdlh.com/)
       multilingual websites consultant



More information about the gnucash-user mailing list