atreadw1492 / yahoo_fin

Scrape stock price history from new (Spring 2017) Yahoo Finance layout
MIT License
286 stars 125 forks source link

On a get market status I've suddenly started getting an AssertionError #58

Closed swoodsy closed 3 years ago

swoodsy commented 3 years ago

At approx 17:15 GMT I started getting this error when getting the market status.
It had been working constantly throughout the day. I was on 0.8.8 when I started getting this error and upgraded to 0.8.9 but still getting the issue

Python 3.9.6 (default, Jul 3 2021, 16:40:50) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from yahoo_fin import stock_info stock_info.get_market_status() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/dist-packages/yahoo_fin/stock_info.py", line 965, in get_market_status quote_data = get_quote_data("^dji") File "/usr/local/lib/python3.9/dist-packages/yahoo_fin/stock_info.py", line 951, in get_quote_data raise AssertionError("""Invalid response from server. Check if ticker is AssertionError: Invalid response from server. Check if ticker is valid.

jafrro commented 3 years ago

I'm seeing the same error on calls to get_quote_data().

swoodsy commented 3 years ago

Downloading the the latest version - 0.8.9.1 fixed this issue for me. (as detailed in Issue #59