"Get Quotes" disabled in Mac OS X

Luis Miranda luis.miranda at fastmail.fm
Sat Aug 4 19:11:01 EDT 2012


On 05/08/2012, at 02:18, John Ralls wrote:

> 
> On Aug 4, 2012, at 2:04 AM, Luis Miranda <luis.miranda at fastmail.fm> wrote:
> 
>> Hi all,
>> 
>> I'm having some trouble getting Gnucash to find Finance::Quote. I downloaded the Gnucash 2.4.11 dmg file and dragged Gnucash to /Applications, then ran "FinanceQuote Update" and let it do its thing. I can run gnc-fq-check OK, it gives me this output:
>> 
>> ("1.17" "vwd" "yahoo_nz" "australia" "amfiindia" "usfedbonds" "canada" "yahoo" "adig" "bux" "aiahk" "yahoo_australia" "unionfunds" "lerevenu" "asia" "tsx" "indiamutual" "bse" "hungary" "known_currencies" "fidelity_direct" "goldmoney" "tdwaterhouse" "trustnet" "ftportfolios_direct" "cominvest" "morningstar" "ftportfolios" "tdefunds" "hu" "za" "fundlibrary" "stockhousecanada_fund" "yahoo_europe" "platinum" "maninv" "tsp" "financecanada" "usa" "france" "troweprice" "nasdaq" "bmonesbittburns" "yahoo_asia" "tiaacref" "troweprice_direct" "seb_funds" "greece" "fidelity" "yahoo_brasil" "fetch_live_currencies" "dwsfunds" "finland" "hex" "asegr" "brasil" "deka" "nyse" "canadamutual" "asx" "finanzpartner" "fool" "dutch" "uk_unit_trusts" "nzx" "aex" "nz" "vanguard" "europe" "bourso")
>> 
>> But when I open the Price Editor in Gnucash the "Get Quotes" button is simply greyed out. Note that in order to get Gnucash to run from the Dock icon I had to add this to /etc/launchd.conf (previously I had to launch it from the Terminal):
>> 
>> setenv PATH /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
>> 
>> I also added /Applications/Gnucash.app/Contents/Resources/bin to try to fix Finance::Quote, but that didn't help at all. I also tried running Gnucash with --debug but there is not a mention of Finance::Quote in the Tracefile...
>> 
>> Am I missing something?
>> 
> 
> Not exactly; more like you have something extra, MacPorts. MacPorts and its cousin Fink modify your environment in a way that's not compatible with Gtk-based applications that don't use whichever one is installed (and so that the other one won't work, either). Really very rude.
> 
> The easy fix would be to use a MacPorts port of Gnucash.
> 
> If you want to use the official bundle, you've got to fix things up so that it can't see the MacPorts installation. You could create a new user and use fast user switching to install Gnucash.app and run Finance Quote Update (which will work only if you or MacPorts haven't done anything with global configuration settings), or you can try the following:
> 
> First remove all of that /opt/local stuff from $PATH, $DYLD_LIBRARY_PATH, and $LD_LIBRARY_PATH. If you have ~/.MacOSX/environment.plist with any Macports environment variables or paths, remove them (or it); ditto for every instance of launchctl.conf, and if you've used launchctl setenv to set a path in your bashrc, you'll need to remove that line and reboot.
> 
> The next problem is that you probably have the MacPorts paths in your shell environment and either have MacPorts perl installed or have cpan fiddled to put modules in a MacPorts location which the Apple-supplied perl can't find. You'll need to clean that out and run Finance Quote Update again. 
> 
> There might be more. I don't use either MacPorts or Fink and I don't know all of the little tricks they play to mess up your environment or launchctl.
> 
> Regards,
> John Ralls
> 

Thanks for the tip regarding MacPorts. I was able to get it working by removing the MacPorts paths from launchd.conf. For reference, this is what was left:

setenv PATH /usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin

If I launch Gnucash from the Dock or Spotlight, the MacPorts paths do not make it into PATH. Because the gnc-fq-* scripts are hardcoded to use /usr/bin/perl, it just works (same with the "Update FinanceQuote" app).

I've used the MacPorts Gnucash before but found it very finicky: it basically broke on every upgrade. So when I reinstalled the OS I thought I would give the official bundle a try.

Thanks again,
Luis




More information about the gnucash-user mailing list