[GNC] gnucash-cli says, "No quotes retrieved. Finance::Quote isn't installed properly" on macOS
Jim DeLaHunt
list+gnucash at jdlh.com
Sat Jun 12 03:22:39 EDT 2021
John:
I appreciate your help.
1. The default per on my path fails gnc-fq-check:
% perl /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-check
You need to install the following Perl modules:
Finance::Quote
Use your system's package manager to install them,
or run 'gnc-fq-update' as root.
missing-lib
2. Which perl? The perl installed by MacPorts in /opt/local:
% which perl
/opt/local/bin/perl
3. Where does the default perl on my path look for modules? From the
location where MacPorts installs perl packages:
% perl -e 'print join("\n", @INC), "\n";'
/opt/local/lib/perl5/site_perl/5.26/darwin-thread-multi-2level
/opt/local/lib/perl5/site_perl/5.26
/opt/local/lib/perl5/vendor_perl/5.26/darwin-thread-multi-2level
/opt/local/lib/perl5/vendor_perl/5.26
/opt/local/lib/perl5/5.26/darwin-thread-multi-2level
/opt/local/lib/perl5/5.26
4. Where did gnc-fq-update install its perl packages? In system
locations, /Library and /usr/local, and not in the MacPorts location.
This is what I saw just before having the above tests fail, and
gnucash-cli decline to retrieve quotes.
Running make install
Manifying 2 pod documents
Manifying 45 pod documents
Installing /Library/Perl/5.18/Date/Manip.pod
Installing /Library/Perl/5.18/Date/Manip.pm
… [omitted for brevity] …
Installing /Library/Perl/5.18/Date/Manip/TZ/euluxe00.pm
Installing /usr/local/share/man/man1/dm_zdump.1
Installing /usr/local/share/man/man1/dm_date.1
… [omitted for brevity] …
Installing /usr/local/share/man/man3/Date::Manip::Calc.3pm
Installing /usr/local/bin/dm_zdump
Installing /usr/local/bin/dm_date
Appending installation info to /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level/perllocal.pod
SBECK/Date-Manip-6.85.tar.gz
/usr/bin/make install -- OK
Finance::Quote is up to date (1.49).
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?
Best regards,
—Jim DeLaHunt
On 2021-06-11 19:39, John Ralls wrote:
> Jim,
>
> Start with
> perl /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-check
> from Terminal to make sure that perl can find F::Q and
> which perl
> from Terminal to see what is the default perl.
>
> If gnc-fq-check fails then
> perl -e 'print join("\n", @INC), "\n";'
> will show you where perl-from-terminal is looking for modules.
>
> Regards,
> John Ralls
>
>
>> On Jun 11, 2021, at 6:58 PM, Jim DeLaHunt <list+gnucash at jdlh.com> wrote:
>>
>> Hello, folks:
>>
>> I have been retrieving online quotes from GnuCash through AlphaVantage for a long time. I would now like to start using gnucash-cli to get online quotes via automation. So first I tried it from Terminal, interactively.
>>
>> It failed, with the error message, "No quotes retrieved. Finance::Quote isn't installed properly."
>>
>> However, I think Finance::Quote ought to be installed properly. a) Retrieving quotes from the Gnucash… Tools… Price Database… Get Quotes… works fine. b) gnc-fq-dump returns prices with no problem. c) gnc-fq-update runs with apparent success.
>>
>> Here's the diagnostics I get from running gnucash-cli:
>>
>> % /Applications/Gnucash.app/Contents/MacOS/gnucash-cli --debug --quotes get $PR/Bookkeeping/current\ ledger.gnucash
>> Application Path /Applications/Gnucash.app/Contents/MacOS/gnucash-cli
>>
>> (process:10336): gnc.gui-WARNING **: 18:45:02.787: [mac_set_languages()] Language list: en:en_CA:C:en_US:C:de_CA:ja_CA:zh_CN:zh_TW:hr_CA
>> * 18:45:02 INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] 3 DBD drivers found
>> * 18:45:02 INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver: pgsql
>> * 18:45:02 INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver: sqlite3
>> * 18:45:02 INFO <gnc.backend.dbi> [gnc_module_init_backend_dbi] Driver: mysql
>> * 18:45:02 INFO <gnc.gui> [Gnucash::CoreApp::start] System locale returned (null)
>> * 18:45:02 INFO <gnc.gui> [Gnucash::CoreApp::start] Effective locale set to en_CA.UTF-8.
>> * 18:45:02 INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb] schema: general, key: retain-days, settings_ptr: 0x7fc8ae00f830, handler_id: 1
>> * 18:45:02 INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb] schema: general, key: retain-type-never, settings_ptr: 0x7fc8ae00f830, handler_id: 2
>> * 18:45:02 INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb] schema: general, key: retain-type-days, settings_ptr: 0x7fc8ae00f830, handler_id: 3
>> * 18:45:02 INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb] schema: general, key: retain-type-forever, settings_ptr: 0x7fc8ae00f830, handler_id: 4
>> * 18:45:02 INFO <gnc.app-utils.gsettings> [gnc_gsettings_register_cb] schema: general, key: file-compression, settings_ptr: 0x7fc8ae00f830, handler_id: 5
>> No quotes retrieved. Finance::Quote isn't installed properly.
>> * 18:45:02 INFO <gnc.engine> [gnc_hook_lookup] no hook lists
>>
>> The Gnucash.trace file looks empty, despite the --debug option:
>>
>> % ls -l $TMPDIR/gnucash.trace
>> -rw------- 1 myuser staff 0 11 Jun 18:10 /var/folders/5p/zmlrjq6c8xj84s0059bnypz80000gp/T//gnucash.trace
>>
>> This is my GnuCash version:
>>
>> % /Applications/Gnucash.app/Contents/MacOS/gnucash-cli -v
>> Application Path /Applications/Gnucash.app/Contents/MacOS/gnucash-cli
>>
>> (process:10400): gnc.gui-WARNING **: 18:49:02.239: [mac_set_languages()] Language list: en:en_CA:C:en_US:C:de_CA:ja_CA:zh_CN:zh_TW:hr_CA
>> GnuCash 4.5
>> Build ID: 4.5+(2021-03-27)
>>
>> I am on macOS 10.13.6 High Sierra.
>>
>> I don't use useful instructions in the wiki, or in a web search of the gnucash-user archives (though the web search returns so little of relevance, I think it must be missing some messages).
>>
>> Any suggestions for diagnosing and fixing this problem?
>>
>> My workaround is to continue running Get Quotes from with in the GUI until I can make the gnucash-cli succeed.
>>
>> Thank you,
>> —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