Bruno,

Please remember to copy the list on all replies.

Well, you upgrade Net::HTTP the same way as everything else,
  sudo cpan -i Net::HTTP

You thought gnc-fq-dump but typed gnc-fq-helper. The latter works a bit 
differently, expecting a scheme list on stdin rather than command line args:

   echo '(yahoo_json "AAPL")' | 
/Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper

I suggest, though, that you keep gnc-fq-foo out of the mix and just use 
~/.cpan/build/Finance-Quote-1.47-XXXXX/Examples/stockdump.pl

Regards,
John Ralls

> On Mar 28, 2019, at 2:16 PM, Bruno Acklin <back...@gmail.com> wrote:
> 
> Hi John,
> 
> Thanks again.
> 
> I installed LWP per your suggestion. LWP seems to have executed fine, but I 
> noticed the following warning:
> # *** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***
> # 
> # The following REQUIRED prerequisites were not satisfied:
> # 
> # Net::HTTP version '6.06' is not in required range ‘6.18’
> 
> Could this be an issue with fetching data from the URL. If so, where is and 
> how do I update Net::HTTP?
> 
> No change on the finance:quote side: gnc-fq-dump generate the same error, and 
> does not seem to take parameters:
> $ /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper yahoo_json 
> aapl
> Can't open yahoo_json: No such file or directory at 
> /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 332.
> Can't open aapl: No such file or directory at 
> /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 332.
> 
> Does line 332 give you an indication?
> 
> Best, Bruno
> 
>> On Mar 27, 2019, at 6:09 PM, John Ralls <jra...@ceridwen.fremont.ca.us> 
>> wrote:
>> 
>> Brian,
>> 
>> It points to something getting borked with perl. After all, Safari and curl 
>> both successfully fetch the URI, so it's not a networking problem. 
>> 
>> Date::Manip installed successfully, ergo ExtUtils::MakeMaker is now happy. 
>> 
>> The Extras/5.18 folder where DateTime and LWP live is in 
>> /System/Library/Perl not /Library/Perl.
>> 
>> I'm out of ideas why Yahoo!'s JSON server won't talk to your perl when it 
>> has no trouble with mine. The only thing left I can think of to try is to 
>> update LWP with 
>>  sudo cpan -i LWP
>> 
>> Regards,
>> John Ralls
>> 
>> 
>>> On Mar 26, 2019, at 9:14 PM, Bruno Acklin <back...@gmail.com> wrote:
>>> 
>>> Hi John,
>>> 
>>> Sorry if I was unclear: the sudo cpan -i Finance::Quote install seemed to 
>>> have succeeded without error messages, but execution still fails as before.
>>> 
>>> I upgraded Xcode to 10.2 and there seems no longer an option to add command 
>>> line tools from Preferences.
>>> My Library/Developer only contained 
>>> /PrivateFrameworks/CoreSimulator.framework and /ROCKit.framework.
>>> So I followed instructions from the link 
>>> https://donatstudios.com/MojaveMissingHeaderFile
>>> to install /CommandLineTools, where I found and installed the 
>>> macOS_SDK_headers_for_macOS_10.14.pkg you suggested. 
>>> 
>>> I would not know where to look if this fixed ExtUtils::MakeMaker, as other 
>>> than for the /CommandLineTools my /Library/Developer and /Library/Perl 
>>> folders looked unchanged. So I deleted Finance-Quote* and Date-Manip* again 
>>> in Library/Perl and ~/.cpan/build, and reinstalled Date::Manip and 
>>> Finance::Quote from clan.
>>> Now my Library/Perl/5.18 contains: /CPAN, /Date, /Devel, /ExtUtils, 
>>> /Finance, /HTML, /JSON, /Mozilla, /Parse, /Pod, /Test, 
>>> /Darwin-thread-multi-2level, as well as AppendToPath and JSON.pm, butno 
>>> /LWP /DateTime (still at 10.14.3, but like your new 10.14.4 install) or a 
>>> /Perl/Extras/5.18 folder.
>>> 
>>> Unfortunately, again no success:
>>> /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump -v yahoo_json 
>>> aapl
>>> Still fails and returns:
>>> ..
>>> All fields returned by Finance::Quote for stock aapl
>>> 
>>> stock           field  value
>>> -----           -----  -----
>>> aapl         errormsg: Error retrieving quote for aapl. Attempt to fetch 
>>> the URL https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl 
>>> resulted in HTTP response 500 (Internal Server Error)
>>> aapl             last: **missing**
>>> aapl              nav: **missing**
>>> aapl            price: **missing**
>>> aapl          success: 0
>>> aapl           symbol: aapl
>>> 
>>> Interestingly though, calling the same URL from the Safari browser 
>>> instantly returns successful quotes..
>>> 
>>> I am still stuck with the fact that selecting “Get Quotes” from the "Price 
>>> Editor” in Gnucash worked fine one week, and not a week later from the same 
>>> Gnucash instance still open and running on my desktop, without closing the 
>>> program, installing any software, or modifying my system, other than 
>>> installing a new router… Does that not point to something outside the OSX 
>>> and Perl installation?
>>> 
>>> Thanks and Best,
>>> Bruno
>>> 
>>> 
>>>> On Mar 25, 2019, at 10:44 PM, John Ralls <jra...@ceridwen.fremont.ca.us> 
>>>> wrote:
>>>> 
>>>> Bruno,
>>>> 
>>>> It turns out that Apple decided to put the perl headers exclusively in the 
>>>> Xcode SDK but their perl patch doesn't quite work. Gory details may be 
>>>> read at https://rt.cpan.org/Public/Bug/Display.html?id=127028.
>>>> 
>>>> The work-around in the last post to that bug, installing command-line 
>>>> tools and then installing 
>>>> /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
>>>>  got me a clean ExtUtils::MakeMaker install without the whining about 
>>>> EXTERNAL.h. With that in place Date::Manip will also install correctly.
>>>> 
>>>> I just found /System/Library/Perl/Extras/5.18/. It has DateTime and LWP, 
>>>> explaining why F::Q doesn't complain about not finding them when they're 
>>>> not in /Library/Perl. In fact in the course of installing Command Line 
>>>> Tools I also got a system upgrade (from 10.14.4beta to 10.14.4) and that 
>>>> removed DateTime and LWP from /Library/Perl/5.18 on my system. It didn't 
>>>> break Finance::Quote, so I guess LWP is ruled out as the source of your 
>>>> problem.
>>>> 
>>>> When you say that Finance::Quote seems to work without problem does that 
>>>> mean that stockdump.pl works but gnc-fq-dump still reports a 500 error?
>>>> 
>>>> Regards,
>>>> John Ralls
>>>> 
>>>> 
>>>> 
>>>>> On Mar 25, 2019, at 4:37 PM, Bruno Acklin <back...@gmail.com> wrote:
>>>>> 
>>>>> Hi John,
>>>>> 
>>>>> I was referring to MacHD/Library/Perl, so proceeded following your 
>>>>> suggestions.
>>>>> 
>>>>> The rm commands worked.
>>>>> Tried installing Date::Manip, as you suggested, which generated a long 
>>>>> log (attached in full), but seems to have failed for the following 
>>>>> reasons (I noticed):
>>>>> 'YAML' not installed, will not store persistent state
>>>>> ..
>>>>> # Test.xs:1:10: fatal error: 'EXTERN.h' file not found
>>>>> # #include "EXTERN.h"
>>>>> #          ^~~~~~~~~~
>>>>> # 1 error generated.              (several times)
>>>>> ..
>>>>> Test Summary Report
>>>>> -------------------
>>>>> t/02-xsdynamic.t        (Wstat: 3072 Tests: 72 Failed: 12)
>>>>> Failed tests:  4, 10, 16, 22, 28, 34, 40, 46, 52, 58, 64
>>>>>              70
>>>>> Non-zero exit status: 12
>>>>> Files=67, Tests=1335, 42 wallclock secs ( 0.34 usr  0.15 sys + 25.66 cusr 
>>>>>  9.00 csys = 35.15 CPU)
>>>>> Result: FAIL
>>>>> Failed 1/67 test programs. 12/1335 subtests failed.
>>>>> make: *** [test_dynamic] Error 255
>>>>> BINGOS/ExtUtils-MakeMaker-7.34.tar.gz
>>>>> /usr/bin/make test -- NOT OK
>>>>> //hint// to see the cpan-testers results for installing this module, try:
>>>>> reports BINGOS/ExtUtils-MakeMaker-7.34.tar.gz
>>>>> Running make install
>>>>> make test had returned bad status, won't install without force
>>>>> Running make for S/SB/SBECK/Date-Manip-6.76.tar.gz
>>>>> Warning: Prerequisite 'ExtUtils::MakeMaker => 6.67_01' for 
>>>>> 'SBECK/Date-Manip-6.76.tar.gz' failed when processing 
>>>>> 'BINGOS/ExtUtils-MakeMaker-7.34.tar.gz' with 'make_test => NO'. 
>>>>> Continuing, but chances to succeed are limited.
>>>>> 
>>>>> CPAN.pm: Building S/SB/SBECK/Date-Manip-6.76.tar.gz
>>>>> 
>>>>> ExtUtils::MakeMaker version 6.6701 required--this is only version 6.66 at 
>>>>> Makefile.PL line 8.
>>>>> BEGIN failed--compilation aborted at Makefile.PL line 8.
>>>>> Warning: No success on command[/usr/bin/perl Makefile.PL]
>>>>> SBECK/Date-Manip-6.76.tar.gz
>>>>> /usr/bin/perl Makefile.PL -- NOT OK
>>>>> Running make test
>>>>> Make had some problems, won't test
>>>>> Running make install
>>>>> Make had some problems, won't install
>>>>> Could not read metadata file. Falling back to other methods to determine 
>>>>> prerequisites.
>>>>> 
>>>>> sudo cpan -i Finance::Quote seems to work fine and complete w/o errors, 
>>>>> but gc-fnc-helper and -dump keep failing with same results as before.
>>>>> 
>>>>> I may have screwed up this sandbox installation, but checked contents of 
>>>>> my desktop which worked before but fails now as well and has not been 
>>>>> changed to the best log my knowledge: (It contains date Date, Finance, 
>>>>> but apparently lacks DateTime, LWP, LWP.pm)
>>>>> 
>>>>> 5.18
>>>>>   CPAN
>>>>>   Darwin-thread-multi-2level
>>>>>   Date
>>>>>   ExtUtils
>>>>>   Finance
>>>>>   HTML
>>>>>   JSON
>>>>>   Mozilla
>>>>>   Parse
>>>>>   Test
>>>>>   AppendToPath
>>>>>   JSON.pm
>>>>> Updates
>>>>>   5.18.2
>>>>>           Darwin-thread-multi-2level
>>>>>   
>>>>> Best, Bruno
>>>>> 
>>>>>> On Mar 24, 2019, at 3:08 PM, John Ralls <jra...@ceridwen.fremont.ca.us> 
>>>>>> wrote:
>>>>>> 
>>>>>> Bruno,
>>>>>> 
>>>>>> No, there's no reason to install a fake-linux package manager.
>>>>>> 
>>>>>> You said "Library/Perl", does that mean /Users/backlin/Library/Perl or 
>>>>>> /Library/Perl? It should be the latter. If it's the former, what's in 
>>>>>> /Library/Perl?
>>>>>> 
>>>>>> Assuming that it *is* /Library/Perl, there are several packages that 
>>>>>> should be there and aren't. I suggest
>>>>>> sudo rm -rf /Library/Perl/5.18/Finance
>>>>>> sudo rm -rf ~/.cpan/build/Finance-Quote*
>>>>>> sudo rm -rf -/.cpan/build/Date-Manip*
>>>>>> sudo cpan -i Date::Manip
>>>>>> sudo cpan -i Finance::Quote
>>>>>> 
>>>>>> Check the output of those last two to make sure that they complete 
>>>>>> successfully. Reinstalling Finance::Quote should pull in the other 
>>>>>> packages. After it's done /Library/Perl/5.18 should contain Date, 
>>>>>> DateTime, Finance, LWP, and LWP.pm in addition to the modules already 
>>>>>> there.
>>>>>> 
>>>>>> Regards,
>>>>>> John Ralls
>>>>>> 
>>>>>> 
>>>>>>> On Mar 24, 2019, at 2:36 PM, Bruno Acklin <back...@gmail.com> wrote:
>>>>>>> 
>>>>>>> Hi John,
>>>>>>> 
>>>>>>> Sorry for the omission and delay.
>>>>>>> 
>>>>>>> No, I have none of these “fake-Linux package managers”(?) installed - 
>>>>>>> should I?
>>>>>>> 
>>>>>>> The reply to backlin$ which perl is
>>>>>>> /usr/bin/perl
>>>>>>> 
>>>>>>> In usr/bin I find two entries:
>>>>>>> perl and
>>>>>>> perl5.18
>>>>>>> 
>>>>>>> The directory Library/Perl contains
>>>>>>> /5.18
>>>>>>>         /Darwin-thread-multi-2level
>>>>>>>         /Finance
>>>>>>>         /HTML
>>>>>>>         /JSON
>>>>>>>         /Mozilla
>>>>>>>         /AppendToPath
>>>>>>>         /JSON.pm
>>>>>>> /Updates
>>>>>>>         /5.18.2
>>>>>>>                 /Darwin-thread-multi-2level
>>>>>>> 
>>>>>>> Looking up contents of 
>>>>>>> ~/.cpan/build/ :
>>>>>>> Date-Manip-6.75-JzZ9Wt          ExtUtils-MakeMaker-7.34-_6iXcq
>>>>>>> Date-Manip-6.76-9mWyaN          Finance-Quote-1.47-_BUlzK
>>>>>>> Date-Manip-6.76-NE8c76          Finance-Quote-1.47-nChsgf
>>>>>>> Date-Manip-6.76-QNnn65          HTML-TableExtract-2.15-dP4w2A
>>>>>>> ExtUtils-MakeMaker-7.34-695wh2  JSON-4.02-RrPsdw
>>>>>>> ExtUtils-MakeMaker-7.34-DVwu8U  Mozilla-CA-20180117-TgJL7x
>>>>>>> ExtUtils-MakeMaker-7.34-U01uzs
>>>>>>> 
>>>>>>> Trying your suggestion with /stockdump.pm for both fnq builds I get a 
>>>>>>> delayed, identical result, even if I misspell aap(l) for a non-existing 
>>>>>>> ticker:
>>>>>>> 
>>>>>>> backlin$ ~/.cpan/build/Finance-Quote-1.47-_BUlzK/Examples/stockdump.pl 
>>>>>>> yahoo_json aapl
>>>>>>> $VAR1 = {
>>>>>>>      'aaplsymbol' => 'aapl',
>>>>>>>      'aaplsuccess' => 0,
>>>>>>>      'aaplerrormsg' => 'Error retrieving quote for aapl. Attempt to 
>>>>>>> fetch the URL 
>>>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl resulted 
>>>>>>> in HTTP response 500 (Internal Server Error)'
>>>>>>> 
>>>>>>> and
>>>>>>> backlin$ ~/.cpan/build/Finance-Quote-1.47-nChsgf/Examples/stockdump.pl 
>>>>>>> yahoo_json aap
>>>>>>> $VAR1 = {
>>>>>>>      'aapsymbol' => 'aap',
>>>>>>>      'aapsuccess' => 0,
>>>>>>>      'aaperrormsg' => 'Error retrieving quote for aap. Attempt to fetch 
>>>>>>> the URL https://query1.finance.yahoo.com/v7/finance/quote?symbols=aap 
>>>>>>> resulted in HTTP response 500 (Internal Server Error)'
>>>>>>>    };
>>>>>>> 
>>>>>>> I am hoping this might give you a clue. I have no idea what could have 
>>>>>>> gone wrong. Just that finance quote stopped working on my desktop and 
>>>>>>> my laptop the same week, when I did not do anything on my system, not 
>>>>>>> even reboot, other than changing the network access updating the router 
>>>>>>> configuration.
>>>>>>> 
>>>>>>> Thanks, and best, Bruno
>>>>>>> 
>>>>>>> 
>>>>>>>> On Mar 22, 2019, at 7:46 PM, John Ralls 
>>>>>>>> <jra...@ceridwen.fremont.ca.us> wrote:
>>>>>>>> 
>>>>>>>> Please remember to copy the list on all replies.
>>>>>>>> 
>>>>>>>> Curl and your browser working exonerates your router.
>>>>>>>> 
>>>>>>>> *Re*-installing perl would I think be challenging; it's provided as 
>>>>>>>> part of MacOS so I'd think that the only safe way to do it would be to 
>>>>>>>> reinstall the OS.
>>>>>>>> 
>>>>>>>> That said, do you have any of the fake-Linux package 
>>>>>>>> managers--Homebrew, MacPorts, or Fink--installed?
>>>>>>>> 
>>>>>>>> What's the output of running
>>>>>>>> which perl
>>>>>>>> from the command line?
>>>>>>>> How about 
>>>>>>>> ~/.cpan/build/Finance-Quote-1.47-XXXXXX/Examples/stockdump.pl 
>>>>>>>> yahoo_json aapl
>>>>>>>> (the XXXXXX bit is random characters that depends on the installation).
>>>>>>>> 
>>>>>>>> Regards,
>>>>>>>> John Ralls
>>>>>>>> 
>>>>>>>>> On Mar 22, 2019, at 3:31 PM, Bruno Acklin <back...@gmail.com> wrote:
>>>>>>>>> 
>>>>>>>>> No, I get an instant reply with content:
>>>>>>>>> {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq
>>>>>>>>>  Real Time Price","currency":"USD","regularMarketPrice":191.05,..
>>>>>>>>> 
>>>>>>>>> Same if I use the fnc query from my browser:
>>>>>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>>>>>> 
>>>>>>>>> Any other ideas, especially related to the router change?
>>>>>>>>> 
>>>>>>>>> Is there a point and safe way in reinstalling all of PERL on MacOS 
>>>>>>>>> Mojave?
>>>>>>>>> 
>>>>>>>>> Best, Bruno
>>>>>>>>> 
>>>>>>>>>> On Mar 22, 2019, at 12:05 PM, John Ralls 
>>>>>>>>>> <jra...@ceridwen.fremont.ca.us> wrote:
>>>>>>>>>> 
>>>>>>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> 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.
>>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> 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.
>>>> 
>>> 
>> 
> 

_______________________________________________
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