yfinance: Failed downloads - "No timezone found, symbol may be delisted"
Hi yfinance team,
start_date = '2020-01-02'
end_date = '2022-01-01'
ticker_list = ['META', 'GOOG', 'ORCL', 'MSFT', 'AMZN']
data = yf.download(ticker_list, start=start_date, end=end_date, ignore_tz=True)[['Close']]
I’m using the above code snippet to download 5 tickers’ data, but I got the following error messages no matter if I changed ignore_tz to False or True.
[100%**] 5 of 5 completed
5 Failed downloads:
- AMZN: No timezone found, symbol may be delisted
- META: No timezone found, symbol may be delisted
- GOOG: No timezone found, symbol may be delisted
- MSFT: No timezone found, symbol may be delisted
- ORCL: No timezone found, symbol may be delisted

yfinance version: 0.2.9 python version: 3.8.5 Operating system: Azure Machine Learning Studio or my kernel is Python 3.8 - AzureML
Please help me figure it out. I really appreciate any help you can provide.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 63 (26 by maintainers)
My error went away after pip uninstall yfinance pip install yfinance --upgrade --no-cache-dir
I can confirm this solved it for me. On my end it was a result of yahoo.com being blacklisted by Pihole. I ended up wildcard whitelisting *.yahoo.com and it works like a charm again.
I wasted the whole day myself on this but fortunately found the solution.
The reason why this was happening for me was that
yfinancedoesn’t allow access in some geographies, their APIs have those restrictions. So you are advised to either use a different data source or a VPN.For what it’s worth, I had the same problem with the same symptom (yFinance == 0.2.36) and the root cause was that the timezone lookup was failing as a result of
fc.yahoo.combeing in the AdGuard blocklist 1Hosts (Lite).I am not using an explicit proxy with yFinance.
I could fix the problem by either manually enabling the domain in AdGuard or changing the yFinance code to use
finance.yahoo.cominstead offc.yahoo.comdata.py, line 160
In the meantime I did the following test by using old-style debug approach and insert print statements in base.py and data.py (To be noted that to test we need a brand new ticker never cached before). For a cached ticker both codes (i.e. with or without the last line) work.
Bottom line Differences seem related to frozendict usage behind the scene… and removing the last line seems indeed to be just a side-effect workaround
With the last line:
Output: Download the historical stock prices for ^N225:
base.py, TickerBase:history():after fix/fetch_tx_via_proxy block:proxy: {‘https’: ‘10.xx.xxx.xx:pppp’} base.py, TickerBase:_fetch_ticker_tz():before _data.cache_get:proxy: {‘https’: ‘10.xx.xxx.xx:pppp’} data.py,TickerData::get:before proxy reformat:proxy–> frozendict.frozendict({‘https’: ‘10.xx.xxx.xx:pppp’}) data.py,TickerData::get:after proxy reformat and before _session.get():proxy–> {‘https’: frozendict.frozendict({‘https’: ‘10.xx.xxx.xx:pppp’})}
1 Failed download: ^N225: No timezone found, symbol may be delisted
Without the last line:
Output Download the historical stock prices for ^N225:
base.py, TickerBase:history():after fix/fetch_tz_via_proxy block:proxy: 10.xx.xxx.xx:pppp base.py, TickerBase:_fetch_ticker_tz():before _data.cache_get–>proxy: 10.xx.xxx.xx:pppp data.py,TickerData::get():before proxy reformat:proxy–> 10.xx.xxx.xx:pppp data.py,TickerData::get():after proxy reformat and before _session.get():proxy–> {‘https’: ‘10.xx.xxx.xx:pppp’} data.py,TickerData::get():before proxy reformat:proxy–> 10.xx.xxx.xx:pppp data.py,TickerData::get():after proxy reformat and before _session.get():proxy–> {‘https’: ‘10.xx.xxx.xx:pppp’}
490 observation dowloaded.