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
{{ message }}
Repository navigation
Error downloading data for "AAPL": No price data found (1d 2019-01-01 -> 2021-06-12) #1797
I'm encountering an error when attempting to download AAPL data and stock ticker using yfinance. The specific error message is:
[*********************100%%**********************] 1 of 1 completed
1 Failed download:
['AAPL']: Exception('%ticker%: No price data found, symbol may be delisted (1d 2019-01-01 -> 2021-01-01)')
I tried running the code snippet on other laptops and on Kaggle, where it worked well. However, it fails to download data only on my laptop.
Troubleshooting Steps Attempted:
Reinstalling yfinance
Checking several date range
Checking several times on different days
Checking with different stock tickers
Code that produces the problem
import pandas as pd
import yfinance as yf
aapl_df = yf.download('AAPL',
start='2019-01-01',
end='2021-06-12',
)
Debug log
DEBUG Entering download()
DEBUG Disabling multithreading because DEBUG logging enabled
DEBUG Entering history()
DEBUG AAPL: Yahoo GET parameters: {'period1': '2019-01-01 00:00:00-05:00', 'period2': '2021-01-01 00:00:00-05:00', 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'}
DEBUG Entering get()
DEBUG url=https://query2.finance.yahoo.com/v8/finance/chart/AAPL
DEBUG params=frozendict.frozendict({'period1': 1546318800, 'period2': 1609477200, 'interval': '1d', 'includePrePost': False, 'events': 'div,splits,capitalGains'})
DEBUG Entering _get_cookie_and_crumb()
DEBUG cookie_mode = 'basic'
DEBUG Entering _get_cookie_and_crumb_basic()
ERROR 1 Failed download:
ERROR ['AAPL']: Exception('%ticker%: No price data found, symbol may be delisted (1d 2019-01-01 -> 2021-01-01)')
DEBUG ['AAPL']: Traceback (most recent call last):
File "/home/yakub/.local/lib/python3.10/site-packages/yfinance/multi.py", line 279, in _download_one
File "/home/yakub/.local/lib/python3.10/site-packages/yfinance/utils.py", line 108, in wrapper
File "/home/yakub/.local/lib/python3.10/site-packages/yfinance/base.py", line 267, in history
Exception: %ticker%: No price data found, symbol may be delisted (1d 2019-01-01 -> 2021-01-01)
DEBUG Exiting download()
I also can't find AAPL price data when i download through http proxy because I live in China.
But when I run the code on a cloud vps is USA. Everythin is OK.
Activity
TheLazyGamer commentedon Dec 23, 2023
I'm experiencing the same issue with Windows 10 and Python version 3.10.2. Happy to provide any log info if needed
nzooherd commentedon Dec 31, 2023
I also can't find AAPL price data when i download through http proxy because I live in China.
But when I run the code on a cloud vps is USA. Everythin is OK.
mckelvin commentedon Feb 19, 2024
Try to run with
raise_errors=True, e.g.:Then you will see the underlying errors.
jarmo-seljamaa commentedon Feb 26, 2024
I believe
raise_errorsis not supported in.download()?Don't claim 'possibly delisted' when Yahoo explains the missing data