yfinance icon indicating copy to clipboard operation
yfinance copied to clipboard

Ticker Attribute "calendar" is not populating for any symbols

Open pmgh2345 opened this issue 2 years ago • 4 comments

This attribute, a DataFrame, is not populating, meaning that one can't access the columns that would give us earnings dates among much other useful info.

yf.Ticker('AAPL').calendar

`Traceback (most recent call last):

File "", line 1, in yf.Ticker('AAPL').calendar

File "C:\Users\Owner\Anaconda3\envs\x1\lib\site-packages\yfinance\ticker.py", line 142, in calendar return self.get_calendar()

File "C:\Users\Owner\Anaconda3\envs\x1\lib\site-packages\yfinance\base.py", line 1445, in get_calendar data = self._quote.calendar

File "C:\Users\Owner\Anaconda3\envs\x1\lib\site-packages\yfinance\scrapers\quote.py", line 115, in calendar self._scrape(self.proxy)

File "C:\Users\Owner\Anaconda3\envs\x1\lib\site-packages\yfinance\scrapers\quote.py", line 124, in _scrape json_data = self._data.get_json_data_stores(proxy=proxy)

File "C:\Users\Owner\Anaconda3\envs\x1\lib\site-packages\yfinance\data.py", line 41, in wrapped return func(*args, **kwargs)

File "C:\Users\Owner\Anaconda3\envs\x1\lib\site-packages\yfinance\data.py", line 292, in get_json_data_stores keys = self._get_decryption_keys_from_yahoo_js(soup)

File "C:\Users\Owner\Anaconda3\envs\x1\lib\site-packages\yfinance\data.py", line 210, in _get_decryption_keys_from_yahoo_js re_data = json.loads(re.search("root.App.main\s+=\s+({.*})", re_script).group(1))

AttributeError: 'NoneType' object has no attribute 'group'`

pmgh2345 avatar Feb 28 '23 09:02 pmgh2345

Fixing this specific error is pointless because decryption isn't working anyway #1407

ValueRaider avatar Feb 28 '23 12:02 ValueRaider

I think this is related to my error with news. Did it also only start for you today or yesterday?

williamc1998 avatar Mar 01 '23 19:03 williamc1998

I don't have this error

ValueRaider avatar Mar 01 '23 19:03 ValueRaider

@williamc1998 I began getting this error on the 28th of February, though I am not entirely sure it had been running fine before that, as I'm not sure the last time I ran the script that would have tested it.

pmgh2345 avatar Mar 02 '23 03:03 pmgh2345