[GNC] Fwd: problems with Finance::Quote 1.49 and and gnucash Build ID: 3.8b+(2019-12-29) on windows 10 64 bit

Frank H. Ellenberger frank.h.ellenberger at gmail.com
Fri Mar 13 17:47:14 EDT 2020


I would suspect the crash happens because of mixing 32-bit Gnucash with
64-bit perl, but I am no Windows user.

~Frank

-------- Weitergeleitete Nachricht --------
Betreff: Re: [GNC] problems with Finance::Quote 1.49 and and gnucash
Build ID: 3.8b+(2019-12-29) on windows 10 64 bit
Datum: Fri, 13 Mar 2020 13:54:02 -0400
Von: Mitchell Hausman <mshausman at verizon.net>
An: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>

Hello Frank,

I still think there's a windows f-q install problem when using GnuCash
to invoke it

Unfortunately,

1)  because i'm such a muddler, it's hard to isolate variables and
determine the actual correct path to a "normal" windows install of
Finance::Quote for GnuCash use

2)  i'm just beginning to understand how to use GnuCash, so some of the
errors might be between the screen and the keyboard, (as they used to
say), but i don't think so


I have a 57 page LibreOffice document showing the steps to a successful
install in windows (it's that many pages because i copied all the
complete perl scripts into it)

IMHO, it shouldn't require so many steps by the user

The Windows install steps should be (again, IMHO):

1) install Gnucash

2) select install online price retrieval from windows start menu (image
below)

done!

*those steps don't appear to work (f-q install fails, or, get quote call
crashes GnuCash)!*


*Bottom Line:*

*Manjaro Linux 19.0 64 bit:*

Using Octopi to install Gnucash, you have the option of adding
dependencies, including Finance::Quote

I previously thought "get quote" function wasn't working on Linux, but
maybe i was setting up the security editor, or price database/price
editor incorrectly

rechecking today, get quote within GnuCash succeeds,  with a normal install!


*Win 10 64 bit:*

from gnucash-guide (downloaded from https://gnucash.org/docs.phtml, for
windows users),  if you want online price retrieval for GnuCash, you do
have to install F-Q separately as a gnucash sub menu from the windows
start menu:


*that did not work (Gnucash calls to F-Q caused crash)*

**

what worked for me (summarized from my install documentation mentioned
above), is:

3/12/2020 6:11 pm

after uninstalling straberryperl and gnucash (without registry cleanup)

1. installed strawberry perl 64 bit


2. used cpanm Module::Name  to install finance::quote in admin cmd window:

C:\WINDOWS\system32>cpanm Finance::Quote

.

.

.

*Successfully installed Finance-Quote-1.49*

9 distributions installed

3. install GnuCash 3.8


4. because it blew up (crashed) with "get quote" call, i installed F-Q
from the windows start menu (see image above)

it succeeded:

.

.

.

Appending installation info to C:\STRAWB~1\perl\lib/perllocal.pod

SBECK/Date-Manip-6.81.tar.gz

C:\STRAWB~1\c\bin\gmake.exe install UNINST=1 -- OK

*Finance::Quote is up to date (1.49).*


* Check environment variable ALPHAVANTAGE_API_KEY


***

*** You need an API key (from https://www.alphavantage.co)

*** to run the Perl module Finance::Quote.

***

*** Make it available to GnuCash by

*** - setting the environment variable ALPHAVANTAGE_API_KEY (done) or

*** - starting GnuCash and adding the Alpha Vantage api key in

*** Edit->Preferences->Online Quotes

***


* Run gnc-fq-check           //shows available quote sources


("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")


* Run gnc-fq-helper


(("AMZN" (symbol . "AMZN") (gnc:time-no-zone . "2020-03-12 12:00:00")
(last . #e1676.6100) (currency . "USD")))


* Installation succeeded


*Summary:*

F-Q calls (get quote) within gnucash work on Manjaro Linux 19.0 after a
"normal" octopi install of GnuCash

After two installs of F-Q (first in strawberry perl 64 bit, then from
windows start menu item), get quote within GnuCash works in Win 10 64 bit


F-Q should not require repeated installs in Windows, but i'm happy i got
it working within GnuCash

If no other Win 10 user complains, i'd consider the issue closed


*one other thing..*

i read
(https://money.stackexchange.com/questions/87192/how-to-fix-financequote-to-pull-quotes-in-gnucash#87270):


/The Yahoo Finance API is no longer available, so
//*Finance::Quote*//needs to point at something else. Recent versions of
//*Finance::Quote*//can use AlphaVantage as a replacement for the Yahoo
Finance API, but individual users need to acquire and input an
AlphaVantage API key. Pretty decent documentation for how to this is
available at the GnuCash wiki. /

//

/Once you've followed the directions on the wiki and set the API key,
you still need to tell each individual security to use AlphaVantage
rather than Yahoo Finance: /

//

 1. /Open the Security Editor (//|Tools|//menu -> //|Security Editor|//)/
 2. /Double-click the security/
 3. /Then, under //|Quote Source Information|//... /
     1. /Check //|Get Online Quotes|/
     2. /Check the //|Unknown:|//radio button/
     3. /Change //|Unknown:|//'s associated menu item to
        //|alphavantage|//./

//

/As a warning, I've been having intermittent trouble with AlphaVantage.
 From the //*GnuCash*//wiki: /

//

/Be patient. Alphavantage does not have the resources that Yahoo! did
and it is common for //*quote*//requests to time out, which
//*GnuCash*//will present as "unknown error". /

//

/I've certainly been experiencing those errors, though not always. /

//

/--Brian/

/=====================================
/

So, as i understand it, the API used is from AlphaVantage (and i have a
key), but i can still choose from a variety of "sources," not to be
confused with exchanges (like usa, NYSE nasdaq, etc.)

The quote source (not exchange)  i personally select in Gnucash security
editor is alphavantage,us  but it could just as easily be one of many
from the drop down list including yahoo as json or YQl, where json/Yql
is a datatype (format)

The alphadvantage documentation page says datatypes available are json
and csv


I'll worry more about that, and the Labels available from the FETCH
method(based on the source used, i guess),  if i get more into using
Perl scripts to get quotes

Perl is an interesting language

=====================================


Again, thanks for hearing me out


Stay Well,

Mitch



On 3/13/2020 6:04 AM, Frank H. Ellenberger wrote:
> Hi Mitch,
>
> please always answer to all or the list. I am no Windows user, so others
> might have better ideas.
>
> BTW the full quotes of websites are hard read.
>
> A few places with additional infos:
> https://wiki.gnucash.org/wiki/Online_Quotes
> https://www.gnucash.org/docs/v3/C/gnucash-help/tips.html
>
> Am 12.03.20 um 21:48 schrieb Mitchell Hausman:
>> Danke
>>
>> this page: https://wiki.gnucash.org/wiki/FAQ states:
>>
>>         *Windows Users:* Note that recent versions of Finance::Quote
>>         require more recent versions of perl on Windows. If you
>>         encounter trouble with the installation, remove whichever perl
>>         you have, both with Control Panel and Windows Explorer, then run
>>         Install Online Price Retrieval, which will install a recent
>>         version of Strawberry Perl <http://strawberryperl.com/> for you.
>>
>>             /N.B.:/ You don't necessarily want to do that if you're
>>             using perl for other purposes, but in that case you probably
>>             already know how to upgrade perl.
>>
>> i hadn't noticed that reference before today
>>
>> i don't know/remember if i had perl installed before gnucash install
>> (probably not), but i did run gnucash's " install online price
>> retrieval," in windows and it didn't install successfully
>>
>> (i thought F-Q  had been separated from GnuCash, and you had to do the
>> install online price retrieval per the instruction above - i _assumed_
>> if it was a menu option, that gnucash did not come with f-q already
>> installed)
>>
>> i also thought that meant install f-q, not install recent perl
>>
>> i went thru many iterations of installing and uninstalling perl (both 64
>> and 32 bit), installing f-q with cpan, installing and uninstalling
>> GnuCash, but i don't recall if i uninstalled perl, then used gnucash to
>> install f-q
>>
>> i think i always did the cpan f-q install after (strawberry) perl install
>>
>> only the 64 bit strawberry perl successfully installed f-q
>>
>>
>> i finally successfully ran Install Online Price Retrieval, after
>> successful cpan install of f-q
>>
>> i thought GnuCash had to "think" it had installed f-q successfully
>>
>> probably a bad idea, but it worked
>>
>>
>> before that, i learned enough perl to run perl scripts that got quotes
>> successfully, so i knew f-q was working
>>
>>
>> get quote in gnucash worked last night (hooray), but it stopped working
>> after i almost replied saying i got it working a few moments ago!
>>
>> so yes, i muddled everything with so many uninstalls and installs!!!!!
>>
>>
>> i guess the correct steps are to uninstall perl and gnucash (they always
>> leave stuff in the registry, so it's not a complete uninstall, so i may
>> not be able to "unmuddle"))
>>
>> install gnucash -*done*
>>
>> see if GnuCash "get quotes" works (doesn't crash GnuCash and gets price
>> data) - *doesn't work *- get quotes greyed out) see attached screenshot
>>
>> if not, run Install Online Price Retrieval - *done, and failed (see
>> attached txt file)*
>>
>> *
>> *
>>
>> ... at end of install:
>>
>> Stopping: 'install' failed for 'JSON::Parse'.
>>
>> * Check environment variable ALPHAVANTAGE_API_KEY
>>
>>    ***
>>    *** You need an API key (from https://www.alphavantage.co)
>>    ***   to run the Perl module Finance::Quote.
>>    ***
>>    *** Make it available to GnuCash by
>>    ***    - setting the environment variable ALPHAVANTAGE_API_KEY (done)
>> or         //key already entered in both places
>>    ***    - starting GnuCash and adding the Alpha Vantage api key in
>>    ***        Edit->Preferences->Online Quotes
>>    ***
>>
>> * Run gnc-fq-check
>>
>>
>> You need to install the following Perl modules: //this is today's result
>> of gnc-fq-check
>>    Finance::Quote
>>
>> Use your system's package manager to install them,
>> or run 'gnc-fq-update' as root.
>> //this failed as well
>> missing-lib
>>
>> An error occurred, see above.
>>
>> Press any key to continue . . .
>>
>>
>>
>> _I've come full circle and have to use cpan in perl to install
>> finance::quote_
>>
>> _but, _cpan install failed as well:
>>
>>
>> collect2.exe: error: ld returned 1 exit status
>> gmake: *** [Makefile:495: blib\arch\auto\JSON\Parse\Parse.xs.dll] Error 1
>>    BKB/JSON-Parse-0.56.tar.gz
>>    C:\STRAWB~1\c\bin\gmake.exe -- NOT OK
>> Stopping: 'install' failed for 'JSON::Parse'.
>>
>>
>> I give up
>>
>> Thanks, though
>>
>>
>> i ran these yesterday:
>>
>> C:\Program Files (x86)\gnucash\bin>perl *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")
>>
>> C:\Program Files (x86)\gnucash\bin>
> That looked goood.
>
>> C:\Program Files (x86)\gnucash\bin>perl *gnc-fq-dump* -v yahoo_json
>> USDEUR=X
>> Finance::Quote fields Gnucash uses:
>>      symbol: USDEUR=X             <=== required
>>        date: 03/11/2020           <=== recommended
>>    currency: EUR                  <=== required
>>        last: 0.8865               <=\
>>         nav:                      <=== one of these
>>       price:                      <=/
>>    timezone:                      <=== optional
>>
>> All fields returned by Finance::Quote for stock USDEUR=X (from alpha
>> advantage web page)
> That is not from alphavantage.co, but yahoo.com. OTOH it is an usable
> result.
>
>> stock           field  value
>> -----           -----  -----
>> USDEUR=X        close: 0.8854
>> USDEUR=X     currency: EUR
>> USDEUR=X         date: 03/11/2020
>> USDEUR=X    div_yield: 0
>> USDEUR=X          eps:
>> USDEUR=X     exchange: Sourced from Yahoo Finance (as JSON)
>> USDEUR=X         high: 0.888
>> USDEUR=X      isodate: 2020-03-11
>> USDEUR=X         last: 0.8865
>> USDEUR=X          low: 0.8796
>> USDEUR=X       method: yahoo_json
>> USDEUR=X         name: USDEUR=X (USD/EUR)
>> USDEUR=X         open: 0.8857
>> USDEUR=X           pe:
>> USDEUR=X      success: 1
>> USDEUR=X       symbol: USDEUR=X
>> USDEUR=X         type: CURRENCY
>> USDEUR=X       volume: 0
>> USDEUR=X   year_range: 0.869880000000001 - 0.927680000000001
> For FX rates it seems, F::Q changed something. I will investigate it now...
>
> Regards
> Frank
>
>> Mitch
>>
>>
>> On 3/12/2020 7:00 AM, Frank H. Ellenberger wrote:
>>> Hello Mitchell,
>>>
>>> Am 09.03.20 um 19:35 schrieb Mitchell Hausman via gnucash-user:
>>>> C:\Program Files (x86)\GnuCash\bin>cpan gnc-fq-dump
>>> while gnc-fq-dump is written in perl, it is not provided  by cpan, but
>>> already installed as part of gnucash.
>>>
>>> So cpan is right here:
>>>>> (error): Skipping gnc-fq-dump because I couldn't find a matching
>>>>> namespace.
>>> Did you muddle cpan (installer) with perl (processor)?
>>>
>>> What is the output of:
>>> perl gnc-fq-check
>>>
>>> HTH
>>> Frank
>>


-- 
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

-------------- next part --------------



More information about the gnucash-user mailing list