Skip to content

Commit

Permalink
Fix corrupt tkr-tz-csv halting code
Browse files Browse the repository at this point in the history
  • Loading branch information
ValueRaider committed Nov 10, 2022
1 parent ddc3434 commit 1687ae6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions yfinance/utils.py
Expand Up @@ -336,7 +336,7 @@ def cache_lookup_tkr_tz(tkr):
return None

mutex.acquire()
df = _pd.read_csv(fp, index_col="Ticker")
df = _pd.read_csv(fp, index_col="Ticker", on_bad_lines="skip")
mutex.release()
if tkr in df.index:
return df.loc[tkr,"Tz"]
Expand All @@ -355,7 +355,7 @@ def cache_store_tkr_tz(tkr,tz):
df.to_csv(fp)

else:
df = _pd.read_csv(fp, index_col="Ticker")
df = _pd.read_csv(fp, index_col="Ticker", on_bad_lines="skip")
if tz is None:
# Delete if in cache:
if tkr in df.index:
Expand Down

0 comments on commit 1687ae6

Please sign in to comment.