[GNC] Finance::Quotes stopped working for me

classic Classic list List threaded Threaded
29 messages Options
12
GB
Reply | Threaded
Open this post in threaded view
|

[GNC] Finance::Quotes stopped working for me

GB
Hello,

I have two problems, one bigger than the other.  I am running OSX Mojave
(10.14.3) Dark which was upgraded about half a year ago

F::Q stopped working for me, it worked last week and a couple days ago.  No
change to OSX, just all of a sudden got this error:  "There was an unknown
error retrieving price quotes."  I use Yahoo_Json for all my quotes.

Any ideas as to why this is all of a sudden a problem?  Is anyone else also
experiencing problems with yahoo_json quotes?

Thanks
GB




--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
_______________________________________________
gnucash-user mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls-2


> On Feb 17, 2019, at 5:58 PM, GB <[hidden email]> wrote:
>
> Hello,
>
> I have two problems, one bigger than the other.  I am running OSX Mojave
> (10.14.3) Dark which was upgraded about half a year ago
>
> F::Q stopped working for me, it worked last week and a couple days ago.  No
> change to OSX, just all of a sudden got this error:  "There was an unknown
> error retrieving price quotes."  I use Yahoo_Json for all my quotes.
>
> Any ideas as to why this is all of a sudden a problem?  Is anyone else also
> experiencing problems with yahoo_json quotes?

It means that there was an error in the price retrieval that GnuCash doesn't have enough information about to report more directly. The most usual reason is a commodity (security) with mis-configured retrieval information. Did you edit or add any in the last few days?

If it's a general yahoo-json problem you can check it with gnc-fq-dump. Open Terminal and run
 /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump yahoo_json AAPL

You should get something like
Finance::Quote fields Gnucash uses:
    symbol: AAPL                 <=== required
      date: 02/15/2019           <=== recommended
  currency: USD                  <=== required
      last: 170.42               <=\
       nav:                      <=== one of these
     price:                      <=/
  timezone:                      <=== optional

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
[hidden email]
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.
GB
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

GB
Thank you John Ralls, I think I've narrowed down the problem.

I unchecked all of the securities that had source of "tsp" and I was able to
get all the quotes from yahoo_json.  Then I used a terminal window to run
"./gnc-fq-dump -v tsp c" and received response of:
"No results found for stock C."  The funds are C,S,I.  I have used this for
at least several years and have not had any problems, this has been
appearing recently.  When I include the tsp funds in the security editor, it
causes all of the other security quotes to fail, even those from other
sources.

Any clues as to what I should do next?  

Thank you very much !
GB



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
_______________________________________________
gnucash-user mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls-2


> On Feb 20, 2019, at 7:06 AM, GB <[hidden email]> wrote:
>
> Thank you John Ralls, I think I've narrowed down the problem.
>
> I unchecked all of the securities that had source of "tsp" and I was able to
> get all the quotes from yahoo_json.  Then I used a terminal window to run
> "./gnc-fq-dump -v tsp c" and received response of:
> "No results found for stock C."  The funds are C,S,I.  I have used this for
> at least several years and have not had any problems, this has been
> appearing recently.  When I include the tsp funds in the security editor, it
> causes all of the other security quotes to fail, even those from other
> sources.
>
> Any clues as to what I should do next?  

It looks like https://www.tsp.gov/investmentfunds/shareprice/sharePriceHistory.shtml has an invalid redirect, so there's nothing to retrieve. Unless that's fixed you won't be able to use Finance::Quote to retrieve prices. I found https://www.tsp.gov/InvestmentFunds/FundPerformance/index.html where you can download a CSV that you might be able to import into GnuCash.

Regards,
John Ralls
_______________________________________________
gnucash-user mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

backlin
Hi John, et all,

I am adding to this string as I experience a similar, possibly related problem:

I am using Gnucash on OSX Mojave 10.14.3. Alphavantage never really worked for me and importantly, crashed Gnucash instead of reporting stocks that could not be retrieved.

Then in February I switched all my stocks tickers to yahoo_json, verifying them with the fnc-gc-dump procedure and it worked great, last on 3/8/19.

Now, since 3/17/19, it suddenly fails all tickers, and fnc-gc-dump reports this error:
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)

But, a browser call to the same website
https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl <https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl>

returns the data properly:
{"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","priceHint":2,"postMarketChangePercent":-0.09571613,"postMarketTime":1553116993,"postMarketChange":-0.18009949,"regularMarketChangePercent":0.873857,"regularMarketDayRange":"184.73 - 189.49","regularMarketPreviousClose":186.53,"bid":187.83,"ask":187.98,"bidSize":13,"askSize":13,"messageBoardId":"finmb_24937","fullExchangeName":"NasdaqGS","longName":”Apple ...

I surmise that the URL response may have changed so the yahoo_json parser does not recognize the information, but I am not a SW person familiar with PERL..
Any suggestion what might have changed, and what to fix?

Thanks, Bruno

> On Feb 22, 2019, at 7:11 AM, John Ralls <[hidden email]> wrote:
>
>
>
>> On Feb 20, 2019, at 7:06 AM, GB <[hidden email]> wrote:
>>
>> Thank you John Ralls, I think I've narrowed down the problem.
>>
>> I unchecked all of the securities that had source of "tsp" and I was able to
>> get all the quotes from yahoo_json.  Then I used a terminal window to run
>> "./gnc-fq-dump -v tsp c" and received response of:
>> "No results found for stock C."  The funds are C,S,I.  I have used this for
>> at least several years and have not had any problems, this has been
>> appearing recently.  When I include the tsp funds in the security editor, it
>> causes all of the other security quotes to fail, even those from other
>> sources.
>>
>> Any clues as to what I should do next?  
>
> It looks like https://www.tsp.gov/investmentfunds/shareprice/sharePriceHistory.shtml has an invalid redirect, so there's nothing to retrieve. Unless that's fixed you won't be able to use Finance::Quote to retrieve prices. I found https://www.tsp.gov/InvestmentFunds/FundPerformance/index.html where you can download a CSV that you might be able to import into GnuCash.
>
> Regards,
> John Ralls
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
Bruno,

I just tested, works fine for me:
$ Argus:/Users/john> gnc-fq-dump yahoo_json AAPL
Finance::Quote fields Gnucash uses:
    symbol: AAPL                 <=== required
      date: 03/20/2019           <=== recommended
  currency: USD                  <=== required
      last: 188.16               <=\
       nav:                      <=== one of these
     price:                      <=/
  timezone:                      <=== optional

 A 500 server error means a glitch at Yahoo!, not anything to do with Finance::Quote. They'd obviously resolved it by the time you used your browser.

Regards,
John Ralls


> On Mar 20, 2019, at 3:43 PM, Bruno Acklin <[hidden email]> wrote:
>
> Hi John, et all,
>
> I am adding to this string as I experience a similar, possibly related problem:
>
> I am using Gnucash on OSX Mojave 10.14.3. Alphavantage never really worked for me and importantly, crashed Gnucash instead of reporting stocks that could not be retrieved.
>
> Then in February I switched all my stocks tickers to yahoo_json, verifying them with the fnc-gc-dump procedure and it worked great, last on 3/8/19.
>
> Now, since 3/17/19, it suddenly fails all tickers, and fnc-gc-dump reports this error:
> 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)
>
> But, a browser call to the same website
> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>
> returns the data properly:
> {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","priceHint":2,"postMarketChangePercent":-0.09571613,"postMarketTime":1553116993,"postMarketChange":-0.18009949,"regularMarketChangePercent":0.873857,"regularMarketDayRange":"184.73 - 189.49","regularMarketPreviousClose":186.53,"bid":187.83,"ask":187.98,"bidSize":13,"askSize":13,"messageBoardId":"finmb_24937","fullExchangeName":"NasdaqGS","longName":”Apple ...
>
> I surmise that the URL response may have changed so the yahoo_json parser does not recognize the information, but I am not a SW person familiar with PERL..
> Any suggestion what might have changed, and what to fix?
>
> Thanks, Bruno
>> On Feb 22, 2019, at 7:11 AM, John Ralls <[hidden email]> wrote:
>>
>>
>>
>>> On Feb 20, 2019, at 7:06 AM, GB <[hidden email]> wrote:
>>>
>>> Thank you John Ralls, I think I've narrowed down the problem.
>>>
>>> I unchecked all of the securities that had source of "tsp" and I was able to
>>> get all the quotes from yahoo_json.  Then I used a terminal window to run
>>> "./gnc-fq-dump -v tsp c" and received response of:
>>> "No results found for stock C."  The funds are C,S,I.  I have used this for
>>> at least several years and have not had any problems, this has been
>>> appearing recently.  When I include the tsp funds in the security editor, it
>>> causes all of the other security quotes to fail, even those from other
>>> sources.
>>>
>>> Any clues as to what I should do next?  
>>
>> It looks like https://www.tsp.gov/investmentfunds/shareprice/sharePriceHistory.shtml has an invalid redirect, so there's nothing to retrieve. Unless that's fixed you won't be able to use Finance::Quote to retrieve prices. I found https://www.tsp.gov/InvestmentFunds/FundPerformance/index.html where you can download a CSV that you might be able to import into GnuCash.
>>
>> Regards,
>> John Ralls
>> _______________________________________________
>> gnucash-user mailing list
>> [hidden email]
>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

backlin
Hi John,

Thanks so much for all the work you do supporting us and your diligent test of the Yahoo_json script!

I have restarted my Mac and Gnucash. The price quote keeps failing on my desktop and laptop test systems.

I keep getting the 500 server error when I use the Terminal command:
gnc-fq-dump -v yahoo_json aapl

But I get another message and hint when I use the helper command:
gnc-fq-helper yahoo_json aapl

Can't locate Date/Manip.pm in @INC (you may need to install the Date::Manip module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.
BEGIN failed--compilation aborted at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.

Did a MacOS update change something in.my working Perl configuration, and do you have any recommendations on how to fix this?

Thanks, Bruno

> On Mar 20, 2019, at 5:26 PM, John Ralls <[hidden email]> wrote:
>
> Bruno,
>
> I just tested, works fine for me:
> $ Argus:/Users/john> gnc-fq-dump yahoo_json AAPL
> Finance::Quote fields Gnucash uses:
>    symbol: AAPL                 <=== required
>      date: 03/20/2019           <=== recommended
>  currency: USD                  <=== required
>      last: 188.16               <=\
>       nav:                      <=== one of these
>     price:                      <=/
>  timezone:                      <=== optional
>
> A 500 server error means a glitch at Yahoo!, not anything to do with Finance::Quote. They'd obviously resolved it by the time you used your browser.
>
> Regards,
> John Ralls
>
>
>> On Mar 20, 2019, at 3:43 PM, Bruno Acklin <[hidden email]> wrote:
>>
>> Hi John, et all,
>>
>> I am adding to this string as I experience a similar, possibly related problem:
>>
>> I am using Gnucash on OSX Mojave 10.14.3. Alphavantage never really worked for me and importantly, crashed Gnucash instead of reporting stocks that could not be retrieved.
>>
>> Then in February I switched all my stocks tickers to yahoo_json, verifying them with the fnc-gc-dump procedure and it worked great, last on 3/8/19.
>>
>> Now, since 3/17/19, it suddenly fails all tickers, and fnc-gc-dump reports this error:
>> 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)
>>
>> But, a browser call to the same website
>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>
>> returns the data properly:
>> {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","priceHint":2,"postMarketChangePercent":-0.09571613,"postMarketTime":1553116993,"postMarketChange":-0.18009949,"regularMarketChangePercent":0.873857,"regularMarketDayRange":"184.73 - 189.49","regularMarketPreviousClose":186.53,"bid":187.83,"ask":187.98,"bidSize":13,"askSize":13,"messageBoardId":"finmb_24937","fullExchangeName":"NasdaqGS","longName":”Apple ...
>>
>> I surmise that the URL response may have changed so the yahoo_json parser does not recognize the information, but I am not a SW person familiar with PERL..
>> Any suggestion what might have changed, and what to fix?
>>
>> Thanks, Bruno
>>> On Feb 22, 2019, at 7:11 AM, John Ralls <[hidden email]> wrote:
>>>
>>>
>>>
>>>> On Feb 20, 2019, at 7:06 AM, GB <[hidden email]> wrote:
>>>>
>>>> Thank you John Ralls, I think I've narrowed down the problem.
>>>>
>>>> I unchecked all of the securities that had source of "tsp" and I was able to
>>>> get all the quotes from yahoo_json.  Then I used a terminal window to run
>>>> "./gnc-fq-dump -v tsp c" and received response of:
>>>> "No results found for stock C."  The funds are C,S,I.  I have used this for
>>>> at least several years and have not had any problems, this has been
>>>> appearing recently.  When I include the tsp funds in the security editor, it
>>>> causes all of the other security quotes to fail, even those from other
>>>> sources.
>>>>
>>>> Any clues as to what I should do next?  
>>>
>>> It looks like https://www.tsp.gov/investmentfunds/shareprice/sharePriceHistory.shtml has an invalid redirect, so there's nothing to retrieve. Unless that's fixed you won't be able to use Finance::Quote to retrieve prices. I found https://www.tsp.gov/InvestmentFunds/FundPerformance/index.html where you can download a CSV that you might be able to import into GnuCash.
>>>
>>> Regards,
>>> John Ralls
>>> _______________________________________________
>>> gnucash-user mailing list
>>> [hidden email]
>>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
Probably not. What would change is the Perl version and consequently what folders @INC points to, but that hasn't changed in the last 5 versions, it's been 5.18 since Yosemite.

gnc-fq-dump doesn't use Date::Manip, but if your Date::Manip is broken it's quite possible that your Finance::Quote is too. They should be installed in /Library/Perl/5.18. I suggest deleting them and running the Finance Quote Update again; if you're comfortable with the command line you can just use `sudo /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-update` from there, that's all that Finance Quote Update does.

Regards,
John Ralls

> On Mar 21, 2019, at 10:54 AM, Bruno Acklin <[hidden email]> wrote:
>
> Hi John,
>
> Thanks so much for all the work you do supporting us and your diligent test of the Yahoo_json script!
>
> I have restarted my Mac and Gnucash. The price quote keeps failing on my desktop and laptop test systems.
>
> I keep getting the 500 server error when I use the Terminal command:
> gnc-fq-dump -v yahoo_json aapl
>
> But I get another message and hint when I use the helper command:
> gnc-fq-helper yahoo_json aapl
>
> Can't locate Date/Manip.pm in @INC (you may need to install the Date::Manip module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.
> BEGIN failed--compilation aborted at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.
>
> Did a MacOS update change something in.my working Perl configuration, and do you have any recommendations on how to fix this?
>
> Thanks, Bruno
>
>> On Mar 20, 2019, at 5:26 PM, John Ralls <[hidden email]> wrote:
>>
>> Bruno,
>>
>> I just tested, works fine for me:
>> $ Argus:/Users/john> gnc-fq-dump yahoo_json AAPL
>> Finance::Quote fields Gnucash uses:
>>    symbol: AAPL                 <=== required
>>      date: 03/20/2019           <=== recommended
>>  currency: USD                  <=== required
>>      last: 188.16               <=\
>>       nav:                      <=== one of these
>>     price:                      <=/
>>  timezone:                      <=== optional
>>
>> A 500 server error means a glitch at Yahoo!, not anything to do with Finance::Quote. They'd obviously resolved it by the time you used your browser.
>>
>> Regards,
>> John Ralls
>>
>>
>>> On Mar 20, 2019, at 3:43 PM, Bruno Acklin <[hidden email]> wrote:
>>>
>>> Hi John, et all,
>>>
>>> I am adding to this string as I experience a similar, possibly related problem:
>>>
>>> I am using Gnucash on OSX Mojave 10.14.3. Alphavantage never really worked for me and importantly, crashed Gnucash instead of reporting stocks that could not be retrieved.
>>>
>>> Then in February I switched all my stocks tickers to yahoo_json, verifying them with the fnc-gc-dump procedure and it worked great, last on 3/8/19.
>>>
>>> Now, since 3/17/19, it suddenly fails all tickers, and fnc-gc-dump reports this error:
>>> 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)
>>>
>>> But, a browser call to the same website
>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>
>>> returns the data properly:
>>> {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","priceHint":2,"postMarketChangePercent":-0.09571613,"postMarketTime":1553116993,"postMarketChange":-0.18009949,"regularMarketChangePercent":0.873857,"regularMarketDayRange":"184.73 - 189.49","regularMarketPreviousClose":186.53,"bid":187.83,"ask":187.98,"bidSize":13,"askSize":13,"messageBoardId":"finmb_24937","fullExchangeName":"NasdaqGS","longName":”Apple ...
>>>
>>> I surmise that the URL response may have changed so the yahoo_json parser does not recognize the information, but I am not a SW person familiar with PERL..
>>> Any suggestion what might have changed, and what to fix?
>>>
>>> Thanks, Bruno
>>>> On Feb 22, 2019, at 7:11 AM, John Ralls <[hidden email]> wrote:
>>>>
>>>>
>>>>
>>>>> On Feb 20, 2019, at 7:06 AM, GB <[hidden email]> wrote:
>>>>>
>>>>> Thank you John Ralls, I think I've narrowed down the problem.
>>>>>
>>>>> I unchecked all of the securities that had source of "tsp" and I was able to
>>>>> get all the quotes from yahoo_json.  Then I used a terminal window to run
>>>>> "./gnc-fq-dump -v tsp c" and received response of:
>>>>> "No results found for stock C."  The funds are C,S,I.  I have used this for
>>>>> at least several years and have not had any problems, this has been
>>>>> appearing recently.  When I include the tsp funds in the security editor, it
>>>>> causes all of the other security quotes to fail, even those from other
>>>>> sources.
>>>>>
>>>>> Any clues as to what I should do next?  
>>>>
>>>> It looks like https://www.tsp.gov/investmentfunds/shareprice/sharePriceHistory.shtml has an invalid redirect, so there's nothing to retrieve. Unless that's fixed you won't be able to use Finance::Quote to retrieve prices. I found https://www.tsp.gov/InvestmentFunds/FundPerformance/index.html where you can download a CSV that you might be able to import into GnuCash.
>>>>
>>>> Regards,
>>>> John Ralls
>>>> _______________________________________________
>>>> gnucash-user mailing list
>>>> [hidden email]
>>>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

backlin
Thanks John,

I deleted Library/Perl/Finance and reinstalled finance::quote using the sudo command.
Installed ok, but no change on errors and messages.

The only change I made between finance::Quote running and now failing was replacing my router from an old Apple TimeCapsule to a U-verse PACE 5268AC modem..

Is there a TCP or UDP port, or another router setting that FQ, respectively JSON needs, which may not be set properly by default?

Thanks, Bruno


> On Mar 21, 2019, at 12:17 PM, John Ralls <[hidden email]> wrote:
>
> Probably not. What would change is the Perl version and consequently what folders @INC points to, but that hasn't changed in the last 5 versions, it's been 5.18 since Yosemite.
>
> gnc-fq-dump doesn't use Date::Manip, but if your Date::Manip is broken it's quite possible that your Finance::Quote is too. They should be installed in /Library/Perl/5.18. I suggest deleting them and running the Finance Quote Update again; if you're comfortable with the command line you can just use `sudo /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-update` from there, that's all that Finance Quote Update does.
>
> Regards,
> John Ralls
>
>> On Mar 21, 2019, at 10:54 AM, Bruno Acklin <[hidden email]> wrote:
>>
>> Hi John,
>>
>> Thanks so much for all the work you do supporting us and your diligent test of the Yahoo_json script!
>>
>> I have restarted my Mac and Gnucash. The price quote keeps failing on my desktop and laptop test systems.
>>
>> I keep getting the 500 server error when I use the Terminal command:
>> gnc-fq-dump -v yahoo_json aapl
>>
>> But I get another message and hint when I use the helper command:
>> gnc-fq-helper yahoo_json aapl
>>
>> Can't locate Date/Manip.pm in @INC (you may need to install the Date::Manip module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.
>> BEGIN failed--compilation aborted at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.
>>
>> Did a MacOS update change something in.my working Perl configuration, and do you have any recommendations on how to fix this?
>>
>> Thanks, Bruno
>>
>>> On Mar 20, 2019, at 5:26 PM, John Ralls <[hidden email]> wrote:
>>>
>>> Bruno,
>>>
>>> I just tested, works fine for me:
>>> $ Argus:/Users/john> gnc-fq-dump yahoo_json AAPL
>>> Finance::Quote fields Gnucash uses:
>>>   symbol: AAPL                 <=== required
>>>     date: 03/20/2019           <=== recommended
>>> currency: USD                  <=== required
>>>     last: 188.16               <=\
>>>      nav:                      <=== one of these
>>>    price:                      <=/
>>> timezone:                      <=== optional
>>>
>>> A 500 server error means a glitch at Yahoo!, not anything to do with Finance::Quote. They'd obviously resolved it by the time you used your browser.
>>>
>>> Regards,
>>> John Ralls
>>>
>>>
>>>> On Mar 20, 2019, at 3:43 PM, Bruno Acklin <[hidden email]> wrote:
>>>>
>>>> Hi John, et all,
>>>>
>>>> I am adding to this string as I experience a similar, possibly related problem:
>>>>
>>>> I am using Gnucash on OSX Mojave 10.14.3. Alphavantage never really worked for me and importantly, crashed Gnucash instead of reporting stocks that could not be retrieved.
>>>>
>>>> Then in February I switched all my stocks tickers to yahoo_json, verifying them with the fnc-gc-dump procedure and it worked great, last on 3/8/19.
>>>>
>>>> Now, since 3/17/19, it suddenly fails all tickers, and fnc-gc-dump reports this error:
>>>> 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)
>>>>
>>>> But, a browser call to the same website
>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>
>>>> returns the data properly:
>>>> {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","priceHint":2,"postMarketChangePercent":-0.09571613,"postMarketTime":1553116993,"postMarketChange":-0.18009949,"regularMarketChangePercent":0.873857,"regularMarketDayRange":"184.73 - 189.49","regularMarketPreviousClose":186.53,"bid":187.83,"ask":187.98,"bidSize":13,"askSize":13,"messageBoardId":"finmb_24937","fullExchangeName":"NasdaqGS","longName":”Apple ...
>>>>
>>>> I surmise that the URL response may have changed so the yahoo_json parser does not recognize the information, but I am not a SW person familiar with PERL..
>>>> Any suggestion what might have changed, and what to fix?
>>>>
>>>> Thanks, Bruno
>>>>> On Feb 22, 2019, at 7:11 AM, John Ralls <[hidden email]> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> On Feb 20, 2019, at 7:06 AM, GB <[hidden email]> wrote:
>>>>>>
>>>>>> Thank you John Ralls, I think I've narrowed down the problem.
>>>>>>
>>>>>> I unchecked all of the securities that had source of "tsp" and I was able to
>>>>>> get all the quotes from yahoo_json.  Then I used a terminal window to run
>>>>>> "./gnc-fq-dump -v tsp c" and received response of:
>>>>>> "No results found for stock C."  The funds are C,S,I.  I have used this for
>>>>>> at least several years and have not had any problems, this has been
>>>>>> appearing recently.  When I include the tsp funds in the security editor, it
>>>>>> causes all of the other security quotes to fail, even those from other
>>>>>> sources.
>>>>>>
>>>>>> Any clues as to what I should do next?  
>>>>>
>>>>> It looks like https://www.tsp.gov/investmentfunds/shareprice/sharePriceHistory.shtml has an invalid redirect, so there's nothing to retrieve. Unless that's fixed you won't be able to use Finance::Quote to retrieve prices. I found https://www.tsp.gov/InvestmentFunds/FundPerformance/index.html where you can download a CSV that you might be able to import into GnuCash.
>>>>>
>>>>> Regards,
>>>>> John Ralls
>>>>> _______________________________________________
>>>>> gnucash-user mailing list
>>>>> [hidden email]
>>>>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
No, Yahoo-JSON is a normal restful API over https, as you observed earlier with your browser.

Do you get the http 500 error if you try
  curl https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
from the command line?

Regards,
John Ralls

> On Mar 22, 2019, at 11:47 AM, Bruno Acklin <[hidden email]> wrote:
>
> Thanks John,
>
> I deleted Library/Perl/Finance and reinstalled finance::quote using the sudo command.
> Installed ok, but no change on errors and messages.
>
> The only change I made between finance::Quote running and now failing was replacing my router from an old Apple TimeCapsule to a U-verse PACE 5268AC modem..
>
> Is there a TCP or UDP port, or another router setting that FQ, respectively JSON needs, which may not be set properly by default?
>
> Thanks, Bruno
>
>
>> On Mar 21, 2019, at 12:17 PM, John Ralls <[hidden email]> wrote:
>>
>> Probably not. What would change is the Perl version and consequently what folders @INC points to, but that hasn't changed in the last 5 versions, it's been 5.18 since Yosemite.
>>
>> gnc-fq-dump doesn't use Date::Manip, but if your Date::Manip is broken it's quite possible that your Finance::Quote is too. They should be installed in /Library/Perl/5.18. I suggest deleting them and running the Finance Quote Update again; if you're comfortable with the command line you can just use `sudo /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-update` from there, that's all that Finance Quote Update does.
>>
>> Regards,
>> John Ralls
>>
>>> On Mar 21, 2019, at 10:54 AM, Bruno Acklin <[hidden email]> wrote:
>>>
>>> Hi John,
>>>
>>> Thanks so much for all the work you do supporting us and your diligent test of the Yahoo_json script!
>>>
>>> I have restarted my Mac and Gnucash. The price quote keeps failing on my desktop and laptop test systems.
>>>
>>> I keep getting the 500 server error when I use the Terminal command:
>>> gnc-fq-dump -v yahoo_json aapl
>>>
>>> But I get another message and hint when I use the helper command:
>>> gnc-fq-helper yahoo_json aapl
>>>
>>> Can't locate Date/Manip.pm in @INC (you may need to install the Date::Manip module) (@INC contains: /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.
>>> BEGIN failed--compilation aborted at /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-helper line 29.
>>>
>>> Did a MacOS update change something in.my working Perl configuration, and do you have any recommendations on how to fix this?
>>>
>>> Thanks, Bruno
>>>
>>>> On Mar 20, 2019, at 5:26 PM, John Ralls <[hidden email]> wrote:
>>>>
>>>> Bruno,
>>>>
>>>> I just tested, works fine for me:
>>>> $ Argus:/Users/john> gnc-fq-dump yahoo_json AAPL
>>>> Finance::Quote fields Gnucash uses:
>>>>  symbol: AAPL                 <=== required
>>>>    date: 03/20/2019           <=== recommended
>>>> currency: USD                  <=== required
>>>>    last: 188.16               <=\
>>>>     nav:                      <=== one of these
>>>>   price:                      <=/
>>>> timezone:                      <=== optional
>>>>
>>>> A 500 server error means a glitch at Yahoo!, not anything to do with Finance::Quote. They'd obviously resolved it by the time you used your browser.
>>>>
>>>> Regards,
>>>> John Ralls
>>>>
>>>>
>>>>> On Mar 20, 2019, at 3:43 PM, Bruno Acklin <[hidden email]> wrote:
>>>>>
>>>>> Hi John, et all,
>>>>>
>>>>> I am adding to this string as I experience a similar, possibly related problem:
>>>>>
>>>>> I am using Gnucash on OSX Mojave 10.14.3. Alphavantage never really worked for me and importantly, crashed Gnucash instead of reporting stocks that could not be retrieved.
>>>>>
>>>>> Then in February I switched all my stocks tickers to yahoo_json, verifying them with the fnc-gc-dump procedure and it worked great, last on 3/8/19.
>>>>>
>>>>> Now, since 3/17/19, it suddenly fails all tickers, and fnc-gc-dump reports this error:
>>>>> 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)
>>>>>
>>>>> But, a browser call to the same website
>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>>
>>>>> returns the data properly:
>>>>> {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","priceHint":2,"postMarketChangePercent":-0.09571613,"postMarketTime":1553116993,"postMarketChange":-0.18009949,"regularMarketChangePercent":0.873857,"regularMarketDayRange":"184.73 - 189.49","regularMarketPreviousClose":186.53,"bid":187.83,"ask":187.98,"bidSize":13,"askSize":13,"messageBoardId":"finmb_24937","fullExchangeName":"NasdaqGS","longName":”Apple ...
>>>>>
>>>>> I surmise that the URL response may have changed so the yahoo_json parser does not recognize the information, but I am not a SW person familiar with PERL..
>>>>> Any suggestion what might have changed, and what to fix?
>>>>>
>>>>> Thanks, Bruno
>>>>>> On Feb 22, 2019, at 7:11 AM, John Ralls <[hidden email]> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> On Feb 20, 2019, at 7:06 AM, GB <[hidden email]> wrote:
>>>>>>>
>>>>>>> Thank you John Ralls, I think I've narrowed down the problem.
>>>>>>>
>>>>>>> I unchecked all of the securities that had source of "tsp" and I was able to
>>>>>>> get all the quotes from yahoo_json.  Then I used a terminal window to run
>>>>>>> "./gnc-fq-dump -v tsp c" and received response of:
>>>>>>> "No results found for stock C."  The funds are C,S,I.  I have used this for
>>>>>>> at least several years and have not had any problems, this has been
>>>>>>> appearing recently.  When I include the tsp funds in the security editor, it
>>>>>>> causes all of the other security quotes to fail, even those from other
>>>>>>> sources.
>>>>>>>
>>>>>>> Any clues as to what I should do next?  
>>>>>>
>>>>>> It looks like https://www.tsp.gov/investmentfunds/shareprice/sharePriceHistory.shtml has an invalid redirect, so there's nothing to retrieve. Unless that's fixed you won't be able to use Finance::Quote to retrieve prices. I found https://www.tsp.gov/InvestmentFunds/FundPerformance/index.html where you can download a CSV that you might be able to import into GnuCash.
>>>>>>
>>>>>> Regards,
>>>>>> John Ralls
>>>>>> _______________________________________________
>>>>>> gnucash-user mailing list
>>>>>> [hidden email]
>>>>>> 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
> [hidden email]
> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
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 <[hidden email]> 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 <[hidden email]> wrote:
>>
>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>

_______________________________________________
gnucash-user mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

backlin
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>
>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>
>

_______________________________________________
gnucash-user mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>
>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>
>>
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

backlin
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>>
>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>
>>>
>>
>> _______________________________________________
>> gnucash-user mailing list
>> [hidden email]
>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>>>
>>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> gnucash-user mailing list
>>> [hidden email]
>>> 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
> [hidden email]
> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

backlin
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 <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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>>>>
>>>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> gnucash-user mailing list
>>>> [hidden email]
>>>> 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
>> [hidden email]
>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>>>>>
>>>>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>>>>
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> gnucash-user mailing list
>>>>> [hidden email]
>>>>> 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
>>> [hidden email]
>>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> wrote:
>>>>>>>>>>
>>>>>>>>>> https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> gnucash-user mailing list
>>>>>>> [hidden email]
>>>>>>> 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
>>>>> [hidden email]
>>>>> 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
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

backlin
   John,
   Thanks for your help and patience!
   I did just that and updated Net::HTTP, as well as LWP, Date::Manip and
   Finance::Quote again. All of them are confirmed up to date now.
   But calling …/stockdump.pl still yields an "internal server error” 500:
   Brunos-MacBook-Pro:~ backlin$
   ~/.cpan/build/Finance-Quote-1.47-FVw_VE/Examples/stockdump.pl
   yahoo_json aapl
   $VAR1 = {
             'aaplsymbol' => 'aapl',
             'aaplsuccess' => 0,
             'aaplerrormsg' => 'Error retrieving quote for aapl. Attempt
   to fetch the URL
   [1]https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
   resulted in HTTP response 500 (Internal Server Error)'
           };
   Why is stockdump.pl misinterpreting the parameters and prepending apple
   to ‘symbol’ and ‘success’ and 'error msg’?
   Still, calling the very URL in the error message using curl works
   instantly:
   Brunos-MacBook-Pro:~ backlin$ curl
   [2]https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
   {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteTyp
   e":"EQUITY","quoteSourceName":"Nasdaq Real Time
   Price","currency":"USD","fullExchangeName":"NasdaqGS","longName":"Apple
   ..
   Could Perl address another "internal server” which times out? A DNS
   issue?
   Do you have any other suggestions to try, or can point out the program
   hierarchy to trace these calls?
   (Again reminding that I have this problem on two independent
   installations, and it appeared overnight, while gnucash on Desktop, and
   Perl Terminal window on Laptop were open and running.)
   Thanks, Bruno

   On Mar 28, 2019, at 6:15 PM, John Ralls
   <[3][hidden email]> wrote:

   ~/.cpan/build/Finance-Quote-1.47-XXXXX/Examples/stockdump.p

References

   1. https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
   2. https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
   3. mailto:[hidden email]
_______________________________________________
gnucash-user mailing list
[hidden email]
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 | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quotes stopped working for me

John Ralls
Stockdump.pl isn't misinterpreting anything. You can pass it multiple symbols and it prepends the symbol to each message so that you know which message goes with which symbol.

It seems unlikely that it's a DNS issue, but you could take the laptop somewhere where there's public wifi and try from there. An Apple Store might be a good choice, because then you can show the problem to a "Genius" and see what they think.

I'm out of ideas for what could be borked with perl. You might try creating a new user and running stock dump as that user (you'll need to adjust permissions in your home directory) just to make sure that it isn't something goofy in your environment.

Regards,
John Ralls



> On Mar 30, 2019, at 3:59 PM, Bruno Acklin <[hidden email]> wrote:
>
> John,
>
> Thanks for your help and patience!
>
> I did just that and updated Net::HTTP, as well as LWP, Date::Manip and Finance::Quote again. All of them are confirmed up to date now.
>
> But calling …/stockdump.pl still yields an "internal server error” 500:
>
> Brunos-MacBook-Pro:~ backlin$ ~/.cpan/build/Finance-Quote-1.47-FVw_VE/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)'
>         };
>
> Why is stockdump.pl misinterpreting the parameters and prepending apple to ‘symbol’ and ‘success’ and 'error msg’?
>
> Still, calling the very URL in the error message using curl works instantly:
> Brunos-MacBook-Pro:~ backlin$ curl https://query1.finance.yahoo.com/v7/finance/quote?symbols=aapl
> {"quoteResponse":{"result":[{"language":"en-US","region":"US","quoteType":"EQUITY","quoteSourceName":"Nasdaq Real Time Price","currency":"USD","fullExchangeName":"NasdaqGS","longName":"Apple ..
>
> Could Perl address another "internal server” which times out? A DNS issue?
> Do you have any other suggestions to try, or can point out the program hierarchy to trace these calls?
> (Again reminding that I have this problem on two independent installations, and it appeared overnight, while gnucash on Desktop, and Perl Terminal window on Laptop were open and running.)
>
> Thanks, Bruno
>
>> On Mar 28, 2019, at 6:15 PM, John Ralls <[hidden email]> wrote:
>>
>> ~/.cpan/build/Finance-Quote-1.47-XXXXX/Examples/stockdump.p
>

_______________________________________________
gnucash-user mailing list
[hidden email]
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.
12