From 8585dda77a36aca5a16386d2af5c8cc9df8e4067 Mon Sep 17 00:00:00 2001 From: ValueRaider Date: Sun, 16 Apr 2023 15:09:28 +0100 Subject: [PATCH] Fix handling Pandas parsing error during TZ-csv-cache migrate --- yfinance/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yfinance/utils.py b/yfinance/utils.py index 7615cc3c4..509e37298 100644 --- a/yfinance/utils.py +++ b/yfinance/utils.py @@ -920,6 +920,8 @@ def _migrate_cache_tkr_tz(self): df = _pd.read_csv(old_cache_file_path, index_col="Ticker") except _pd.errors.EmptyDataError: _os.remove(old_cache_file_path) + except TypeError: + _os.remove(old_cache_file_path) else: self.tz_db.bulk_set(df.to_dict()['Tz']) _os.remove(old_cache_file_path)