David,

Sorry for the typos, I should have tested first. Then I would have realized 
that of course price-quotes.scm eats gnc-fq-helper’s stdout--that’s after all 
how it gets the quotes. Unfortunately it seems also to send stderr to /dev/null 
so that approach won’t work without changing price-quotes.scm.

Regards,
John Ralls

> On Feb 8, 2018, at 9:05 AM, David T. <sunfis...@yahoo.com> wrote:
> 
> John,
> 
> Thanks for the suggestion. I inserted the line as you indicated (at line 324 
> in my copy of gnc-fq-helper), but didn’t get any output on the command line 
> after “Found Finance::Quote version 1.47”
> 
> I’m not much for perl, but I noticed your snippet had one ‘(‘, one  ‘{‘, and 
> two ‘}’. I tried it that way, and then I tried changing the last ‘}’ to ‘)’, 
> but that didn’t change anything. I also tried adding a semi-colon at the end 
> of the line, without effect. Heck, I even tried putting a Hello world print 
> statement, but that didn’t generate either. Either I am a bone fide idiot, or 
> there is something else going on here. I’ve got my money on the first, but I 
> hold out hope that it’s the second. Is it possible that I’ve latched on to 
> the wrong file somehow? Or that the command isn’t going to the standard 
> output?
> 
> David
> 
> P.S.: Should I be seeing:
> 
> /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.30.2/Common/ChunkCompression.cpp:50:
>  Error: unsupported compressor 8
> /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.30.2/Libraries/CompressData/CompressData.c:353:
>  Error: Unknown compression scheme encountered for file 
> '/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Exceptions.plist'
> /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.30.2/Common/ChunkCompression.cpp:50:
>  Error: unsupported compressor 8
> /BuildRoot/Library/Caches/com.apple.xbs/Sources/AppleFSCompression/AppleFSCompression-96.30.2/Libraries/CompressData/CompressData.c:353:
>  Error: Unknown compression scheme encountered for file 
> '/System/Library/CoreServices/CoreTypes.bundle/Contents/Library/AppExceptions.bundle/Exceptions.plist’
> 
> at the command line? This appears at startup before the F::Q note...
> 
>> On Feb 8, 2018, at 9:33 PM, John Ralls <jra...@ceridwen.us 
>> <mailto:jra...@ceridwen.us>> wrote:
>> 
>> 
>> 
>>> On Feb 8, 2018, at 6:52 AM, David T. via gnucash-user 
>>> <gnucash-user@gnucash.org <mailto:gnucash-user@gnucash.org>> wrote:
>>> 
>>> In thread 
>>> https://lists.gnucash.org/pipermail/gnucash-user/2018-January/074224.html 
>>> <https://lists.gnucash.org/pipermail/gnucash-user/2018-January/074224.html> 
>>> <https://lists.gnucash.org/pipermail/gnucash-user/2018-January/074224.html 
>>> <https://lists.gnucash.org/pipermail/gnucash-user/2018-January/074224.html>>,
>>>  I noted that after upgrading my installation from 2.6.16 to 2.6.19 on my 
>>> Mac (OS X 10.13.3), Price retrieval was failing with the generic error: 
>>> "There was an unknown error while retrieving the price quotes.”
>>> 
>>> *** As I noted there: Finance::Quote works at the command line:
>>> 
>>> $ /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-check
>>> ("1.47" "adig" "aex" "aiahk" "alphavantage" "amfiindia" "asegr" "asia" 
>>> "asx" "australia" "bamosz" "bet" "bmonesbittburns" "bourso" "brasil" "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" "indiamutual" 
>>> "known_currencies" "lerevenu" "maninv" "morningstar" "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" "yahoo_asia" "yahoo_australia" "yahoo_brasil" "yahoo_europe" 
>>> "yahoo_json" "yahoo_nz" "yahoo_yql" "za" "za_unittrusts”)
>>> 
>>> $ /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump -v 
>>> alphavantage AAPL
>>> Finance::Quote fields Gnucash uses:
>>>   symbol: AAPL                 <=== required
>>>     date: 02/08/2018           <=== recommended
>>> currency: USD                  <=== required
>>>     last: 160.1350             <=\       
>>>      nav:                      <=== one of these
>>>    price:                      <=/        
>>> timezone:                      <=== optional
>>> 
>>> *** As I noted earlier: I restored the following two lines to 
>>> /Applications/Gnucash.app/Contents/Resources/etc/gnucash/environment:
>>> 
>>> # Set AlphaVantage API Key to allow Finance::Quote to work
>>> ALPHAVANTAGE_API_KEY=************8SET
>>> 
>>> It seems to me that somehow Gnucash.app is not reading or using the 
>>> ALPHAVANTAGE_API_KEY that is stored in its environment file. Either that, 
>>> or somehow my environment file is not properly configured. However, I do 
>>> not see any way to test these hypotheses. 
>>> 
>>> Can anyone tell me how I might determine **FROM WITHIN GNUCASH.APP** 
>>> whether the Alphavantage API key is being read, and what its value 
>>> currently is? Is there any other way to troubleshoot this problem?
>> 
>> David,
>> 
>> There’s no UI for examining the environment. I can only say that it works 
>> for me on MacOS 10.13 and GnuCash 2.6.19.
>> 
>> If you’re willing to hack a bit you could add a snippet to 
>> GnuCash.app/Contents/Resources/bin/gnc-fq-helper to print out the value of 
>> the key:
>> 
>>  print (“Alphavantage Key: $ENV{‘ALPHAVANTAGE_API_KEY’}\n”}
>> 
>> Put it down at the bottom somewhere after the #Runtime comment. You’ll have 
>> to run GnuCash from the command line to see that output.
>> 
>> Geert pushed a commit last week that keeps the Alphavantage key in 
>> preferences instead of the environment file so that in 3.0 one won’t have to 
>> keep resetting the environment file.
>> 
>> Regards,
>> John Ralls
> 

_______________________________________________
gnucash-user mailing list
gnucash-user@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.

Reply via email to