You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.9/dist-packages/yfinance/scrapers/fundamentals.py:33: DeprecationWarning: 'Ticker.earnings' is deprecated as not available via API. Look for "Net Income" in Ticker.income_stmt.
warnings.warn("'Ticker.earnings' is deprecated as not available via API. Look for "Net Income" in Ticker.income_stmt.", DeprecationWarning)
none
or this for get_earnings_dates :
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/pandas/core/indexes/base.py", line 3805, in get_loc
return self._engine.get_loc(casted_key)
File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Earnings Date'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/www/python/sample_earnings.py", line 23, in
list = ticker.get_earnings_dates(limit=48)
File "/usr/local/lib/python3.9/dist-packages/yfinance/utils.py", line 104, in wrapper
result = func(args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/yfinance/base.py", line 631, in get_earnings_dates
tzinfo = dates[cn].str.extract('([AP]M[a-zA-Z])$')
File "/usr/local/lib/python3.9/dist-packages/pandas/core/frame.py", line 4102, in getitem
indexer = self.columns.get_loc(key)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/indexes/base.py", line 3812, in get_loc
raise KeyError(key) from err
KeyError: 'Earnings Date'
Bad data proof
so we get this error because i think we need to log into with an yahoo account.
How can use this api in connecting me before via python ?
yfinance version
0.2.50
Python version
No response
Operating system
linux
The text was updated successfully, but these errors were encountered:
Describe bug
The earnings_dates record is not available
Simple code that reproduces your problem
yfinance.Ticker.earnings
yfinance.Ticker.get_earnings
yfinance.Ticker.get_earnings_dates
Debug log
/usr/local/lib/python3.9/dist-packages/yfinance/scrapers/fundamentals.py:33: DeprecationWarning: 'Ticker.earnings' is deprecated as not available via API. Look for "Net Income" in Ticker.income_stmt.
warnings.warn("'Ticker.earnings' is deprecated as not available via API. Look for "Net Income" in Ticker.income_stmt.", DeprecationWarning)
none
or this for get_earnings_dates :
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/pandas/core/indexes/base.py", line 3805, in get_loc
return self._engine.get_loc(casted_key)
File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'Earnings Date'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/www/python/sample_earnings.py", line 23, in
list = ticker.get_earnings_dates(limit=48)
File "/usr/local/lib/python3.9/dist-packages/yfinance/utils.py", line 104, in wrapper
result = func(args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/yfinance/base.py", line 631, in get_earnings_dates
tzinfo = dates[cn].str.extract('([AP]M[a-zA-Z])$')
File "/usr/local/lib/python3.9/dist-packages/pandas/core/frame.py", line 4102, in getitem
indexer = self.columns.get_loc(key)
File "/usr/local/lib/python3.9/dist-packages/pandas/core/indexes/base.py", line 3812, in get_loc
raise KeyError(key) from err
KeyError: 'Earnings Date'
Bad data proof
so we get this error because i think we need to log into with an yahoo account.
How can use this api in connecting me before via python ?
yfinance
version0.2.50
Python version
No response
Operating system
linux
The text was updated successfully, but these errors were encountered: