ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
13k stars 2.3k forks source link

earning and quarterly_earnings returns Exception: yfinance failed to decrypt Yahoo data response #1470

Closed psmukherjee009 closed 1 year ago

psmukherjee009 commented 1 year ago

Code

import yfinance as yf

msft = yf.Ticker("MSFT")

show earnings

print(msft.earnings) print(msft.quarterly_earnings)

Traceback

Traceback (most recent call last): File "/home/partha/ace/testing_ground/test_yfinance_base.py", line 46, in print(msft.earnings) File "/home/partha/.local/lib/python3.10/site-packages/yfinance/ticker.py", line 150, in earnings return self.get_earnings() File "/home/partha/.local/lib/python3.10/site-packages/yfinance/base.py", line 1550, in get_earnings data = self._fundamentals.earnings[freq] File "/home/partha/.local/lib/python3.10/site-packages/yfinance/scrapers/fundamentals.py", line 34, in earnings self._scrape_earnings(self.proxy) File "/home/partha/.local/lib/python3.10/site-packages/yfinance/scrapers/fundamentals.py", line 57, in _scrape_earnings self._scrape_basics(proxy) File "/home/partha/.local/lib/python3.10/site-packages/yfinance/scrapers/fundamentals.py", line 48, in _scrape_basics self._financials_data = self._data.get_json_data_stores('financials', proxy) File "/home/partha/.local/lib/python3.10/site-packages/yfinance/data.py", line 43, in wrapped return func(*args, **kwargs) File "/home/partha/.local/lib/python3.10/site-packages/yfinance/data.py", line 318, in get_json_data_stores stores = decrypt_cryptojs_aes_stores(data, keys) File "/home/partha/.local/lib/python3.10/site-packages/yfinance/data.py", line 164, in decrypt_cryptojs_aes_stores raise Exception("yfinance failed to decrypt Yahoo data response") Exception: yfinance failed to decrypt Yahoo data response

Version:

Python 3.10.6 YFinance 0.2.14

psmukherjee009 commented 1 year ago

Still an issue.

ValueRaider commented 1 year ago

Still a duplicate. Look through existing issues first, particularly the PINNED issue