yf.download crashes python
Author: hasandiwanCreated May 15, 2026Updated May 15, 2026
Describe bug
Using the latest master, though this occurs with 1.3.0 as well, I get no data for any symbols, currency or equities, from yfinance. Am using Debian sid -- again, up-to-date -- with python 3.13.12.
Simple code that reproduces your problem
yf.config.debug.logging = True
try:
data = yf.Ticker(symbol)
if not data or data.history().empty:
raise ValueError("No data")
title = data.get_history_metadata().get("longName")
frame = data.history(period="max")
except YFException:
d = {}
[
d.update({i[0]: i[1].get("name")})
for i in isocodes.currencies.by_alpha_3
]
try:
title = "/".join([d[s] for s in symbol.split("/")])
except KeyError:
return {"error": "Symbol not found", "time": time.time() - start}
frame = yf.download(f"{symbol}=X", progress=False)
frame.columns = [f[0] for f in frame.columns]
bottle.request.params.update(
{"sym": bottle.request.params.get("col", "Close")}
)
try:
frame.index = pd.to_datetime(frame.index).tz_convert("UTC")
except TypeError:
frame.index = pd.to_datetime(frame.index).tz_localize("UTC")
Debug log with debug logging enabled
No idea where this would be :(
Bad data proof
frame Empty DataFrame Columns: [Adj Close, Close, High, Low, Open, Volume] Index: []
yfinance version
1.3.0, but also the latest master
Python version
3.13.12
Operating system
Debian Linux forky/sid
Source: ranaroussi/yfinance