[GNC] gnucash-cli says, "No quotes retrieved. Finance::Quote isn't installed properly" on macOS

Jim DeLaHunt list+gnucash at jdlh.com
Sun Jun 13 02:30:05 EDT 2021


On 2021-06-12 19:54, D. via gnucash-user wrote:

> Jim,
>
> I understand your complaint here, but it seems to me that the issue here is that MacPorts is prepending its directories into the environment path. Because they altered the path to prefer their own executables before the Apple supplied ones, gnucash-cli fails. …
That is true but incomplete. The other part of the situation is that 
GnuCash presents itself as two different executables, and in this case 
the OS provides those two executables with two different environments, 
and it leads to different behaviours by the two executables, which are 
baffling to the user. GnuCash could perhaps reduce the bafflement, in 
various ways.
> …That doesn't seem to me to be a fault of Gnucash or its documentation.

Rather than "fault", I am thinking, what can GnuCash contribute to 
making this situation better for its users?

I submit that installing packages with MacPorts or Homebrew has aspects 
of installing application software, as well as aspects of altering the 
OS. Installing application software is a reasonable thing for people to 
do with their personal computers. I don't think its reasonable to say 
that GnuCash should ignore the existence of MacPorts and Homebrew.

Does this situation ever occur on Linux?  Do any Linux package managers 
install a second instance of perl, which gnucash-cli picks up 
differently than the GnuCash GUI does?

There are precedents for GnuCash adding code to achieve success despite 
a complex environment, and to give good diagnostics when a failure 
happens anyway. There is certainly precedent for GnuCash documentation 
helping users understand those failures and work around them.

       —Jim DeLaHunt

>   
>
> David
>
>
> -------- Original Message --------
> From: Jim DeLaHunt <list+gnucash at jdlh.com>
> Sent: Sat Jun 12 21:31:41 EDT 2021
> To: gnucash-user at gnucash.org
> Subject: Re: [GNC] gnucash-cli says, "No quotes retrieved. Finance::Quote isn't installed properly" on macOS
>
> On 2021-06-12 09:13, John Ralls wrote:
>
>>> On Jun 12, 2021, at 12:22 AM, Jim DeLaHunt <list+gnucash at jdlh.com> wrote:
>>>
>>> OK, I can understand that the MacPorts installation of perl may be configured to look for perl packages in MacPorts locations, and ignore the system locations. But I don't understand wny the GUI app of GnuCash apparently can find Finance::Quote when run from the GUI, but the gnucash-cli app apparently cannot. What is different?
>> Because applications started by LaunchServices don't get the environment from your shell's startup files. That means GnuCash is running /usr/bin/perl, not /opt/local/bin/perl but when you run a program from Terminal the environment is read so gnucash-cli runs /opt/local/bin/perl.
> Thank you, John, this explanation is very helpful. I can understand that
> the GnuCash GUI and the gnucash-cli experience different environments,
> especially different $PATH values, because the OS invokes them in
> different environments.
>
> But I find it very confusing to have gnucash-cli be presented as an
> integral part of GnuCash, and all the references to a singular action of
> "update Finance::Quote on the system", then have gnucash-cli behave
> differently and require a different installation of Finance::Quote than
> the GnuCash GUI.
>
> It seems to me that if both gnucash-cli and the GnuCash GUI would invoke
> the perl executable at an absolute path, then they would have consistent
> behaviour. Thus I wonder why GnuCash lets the environment find the perl
> executable.
>
> I have filed Bug 798209, "gnucash-cli might not use the same perl and
> Finance::Quote as GnuCash GUI",
> <https://bugs.gnucash.org/show_bug.cgi?id=798209> , to track this.
>
> My workaround as a MacPorts user: install Finance::Quote into the
> MacPorts perl environment:
>
> ```
> % port install p5-finance-quote
> ````
>
>      —Jim DeLaHunt
>
> _______________________________________________
> 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
> 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 at 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.


More information about the gnucash-user mailing list