KMyMoney and Finance::Quote

Andre Joost andrejoost at gmx.de
Sat Aug 6 16:13:20 BST 2022


Hi Thomas,

thanks for taking up the issue.

Am 06.08.22 um 15:55 schrieb Thomas Baumgart via KMyMoney:

>
> Some parts may have been changed due to a GSoC project last year. So
> I am not sure. For some reason, I cannot run the perl script. Update:
> well after some tweaking (removing some local leftovers from a
> manually installed F::Q version) I am now able to retrieve the list
> of sources with
>
> perl /usr/share/kmymoney/misc/financequote.pl -l
>
> and the combo box in KMyMoney fills with the translated names of the
> sources when I turn on the "Use Finance::Quote" checkbox with the
> security.
>
> I cannot retrieve any quotes though, because I get the following
> error:
>
> kmymoney_webpricequote: quotedata "Can't locate Mozilla/CA.pm in @INC
> (you may need to install the Mozilla::CA module) (@INC contains:
> /usr/lib/perl5/site_perl/5.26.1/x86_64-linux-thread-multi
> /usr/lib/perl5/site_perl/5.26.1
> /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.26.1
> /usr/lib/perl5/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/5.26.1
> /usr/lib/perl5/site_perl) at
> /usr/lib/perl5/vendor_perl/5.26.1/Finance/Quote/Tiaacref.pm line
> 33.\nCompilation failed in require at (eval 297) line 1.\nBEGIN
> failed--compilation aborted at (eval 297) line 1.\n at
> /usr/share/kmymoney/misc/financequote.pl line 56.\nError 2"
>
> kmymoney_webpricequote: stripped text "Can't locate Mozilla/CA.pm in
> @INC (you may need to install the Mozilla::CA module) (@INC contains:
> /usr/lib/perl5/site_perl/5.26.1/x86_64-linux-thread-multi
> /usr/lib/perl5/site_perl/5.26.1
> /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
> /usr/lib/perl5/vendor_perl/5.26.1
> /usr/lib/perl5/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/5.26.1
> /usr/lib/perl5/site_perl) at
> /usr/lib/perl5/vendor_perl/5.26.1/Finance/Quote/Tiaacref.pm line 33.
> Compilation failed in require at (eval 297) line 1. BEGIN
> failed--compilation aborted at (eval 297) line 1. at
> /usr/share/kmymoney/misc/financequote.pl line 56. Error 2"
>
> when running KMyMoney inside a terminal window. I see the same
> message when running
>
> perl /usr/share/kmymoney/misc/financequote.pl unionfunds
> US7565771026
>
> I am not a perl expert and don't see the necessary package on my
> openSUSE Leap 15.4 which brings the missing Mozilla/CA.pm module. The
> ISIN is that of RedHat in case you wonder.
>
> @Andre: can you provide the output of the above command so that I can
> probably bypass my local problem and see why KMyMoney has a problem
> with it?
>
>


Using your cammand line on Linux and the original Union.pm, I get "error
2", because unionfunds only has their own funds listed, and not RedHat
shares.

However, Mozilla:CA.pm is present with me.

After installing the latest files of Finance:Quote, I got similar error
messages. So I have started
cpan install finance::Quote
to get it the regular way, and that installed all dependencies from
third-party modules. That took quite some time (about an hour), but no
missing modules anymore.

Enabling the dump print in financequote.pl, I get this output on Windows:

D:\jo\Finanz\perl>perl D:\jo\Finanz\perl\financequote.pl unionfunds
DE0008491002

         finding price for <DE0008491002> from <unionfunds>
$VAR1 = 'DE0008491002?name';
$VAR2 = 'UniFonds';
$VAR3 = 'DE0008491002?success';
$VAR4 = 1;
$VAR5 = 'DE0008491002?last';
$VAR6 = '52.14';
$VAR7 = 'DE0008491002?isodate';
$VAR8 = '2022-08-04';
$VAR9 = 'DE0008491002?exchange';
$VAR10 = 'UNION';
$VAR11 = 'DE0008491002?currency';
$VAR12 = 'EUR';
$VAR13 = 'DE0008491002?symbol';
$VAR14 = 'DE0008491002';
$VAR15 = 'DE0008491002?price';
$VAR16 = '52.14';
$VAR17 = 'DE0008491002?method';
$VAR18 = 'unionfunds';
$VAR19 = 'DE0008491002?date';
$VAR20 = '08/04/2022';
"DE0008491002","2022-008-004","52.14"
D:\jo\Finanz\perl>perl D:\jo\Finanz\perl\financequote.pl unionfunds
US7565771026

         finding price for <US7565771026> from <unionfunds>
$VAR1 = 'US7565771026?errormsg';
$VAR2 = 'No data returned';
$VAR3 = 'US7565771026?success';
$VAR4 = 0;
Error 3

Greetings,
Andre




More information about the KMyMoney mailing list