I am trying to scrape data using yfinance and have met a road block when trying to retrieve a ticker with no data, the error is
- 7086.KL: No data found for this date range, symbol may be delisted. How do I try catch this error? I've tried try catching it as seen in the code below but it still prints that error.
tickerdata = yf.Ticker("7086.KL") try: history = tickerdata.history(start="2019-06-01", end="2020-05-01") except ValueError as ve: print("Error")