Problems with yahoo finance api

I have a problem with pulling data from yfinance.
Yahoo Finance has changed something in data structure again. Does somebody knows something about this ?

  • yfinance is always a cat and mouse game, as it is not an official library.
  • Have you installed the latest version yfinance==0.2.32
  • The error itself comes from pandas, probably because it got no data.
  • You have to handle yfinance errors instead of crashing your app.
1 Like

Hey Mike!

Was the company or fund that generated the error listed on the exchange dating back to 2000? If not, that could be the potential cause of the issue or there may not be any data available for the symbol at all.

Are you looping through a list of symbols to collect data? If so, using an exception will likely help resolve the issue.

Yahoo is in the process of transitioning to their newly redesigned site. Both the new and original site are currently live, but they’ve been making a lot of changes. If the yfinance library is scrapping the pages to retrieve data, any changes to the sites HTML could cause an error. I’ve been getting the impression that Yahoo has been stepping up their efforts to prevent the site from being scrapped.

New Site

Original Site