OpenBB-finance / OpenBB

Investment Research for Everyone, Everywhere.
https://openbb.co
Other
34.09k stars 3.13k forks source link

[Bug] stocks/fa/info - Error: Yahoo has again changed data format, yfinance now unsure which key(s) is for decryption #4044

Closed deeleeramone closed 1 year ago

deeleeramone commented 1 year ago

Recreate with:

/stocks/load aapl/fa/info

image

Related to this: https://github.com/ranaroussi/yfinance/issues/1329

JerBouma commented 1 year ago

Just fyi, this applies to anything regarding Yahoo Finance (stocks/quote, stocks/sia, stocks/fa and stocks/options). It pretty much always includes this error message when you run something even if it does work like /stocks/load aapl/fa/income.

deeleeramone commented 1 year ago

/Portfolio, Portfolio/PO, /reports, /etf, /crypto, basically every menu will have problems because of this.

kajdo commented 1 year ago

obvious - but to keep the error report complete .... affects also the sdk

kajdo commented 1 year ago

no guarantee that it fixes your issue - but just followed up on the issue on yfinance git and their community and devs are pretty awesome (https://github.com/ranaroussi/yfinance/issues/1329)

as said - no guarantee ... but first tests on my side were successful changing the pip package via

pip install git+https://github.com/ranaroussi/yfinance.git@main

there is an issue reported by pip because openbb has a dependency to a specific yfinance version - but it fixed my issue

edit: i think there might be some changes necessary on openbb side as well ... see image

JerBouma commented 1 year ago

Hi @kajdo,

Given the instability of yfinance, we're opening PRs to become less reliant on Yahoo Finance so that most functionality will continue to work despite Yahoo Finance breaking. We've noticed that market data seems to function properly 99% of the time whereas other functionality breaks so we are changing the default source. For example see #4055.

kajdo commented 1 year ago

@JerBouma think that's a good thing - at least for core functionalities ... that will make openbb much more stable i guess (even though the yfinance project is great, its always up to yahoo when they decide to change something)

will see if i can help out somehow

JerBouma commented 1 year ago

@JerBouma think that's a good thing - at least for core functionalities ... that will make openbb much more stable i guess (even though the yfinance project is great, its always up to yahoo when they decide to change something)

will see if i can help out somehow

Yes, that's our thinking too. It is a bit unfortunate that many functionalities break as soon as yfinance stops working. With these changes, we are less reliant on that package making it possible to use the same version much longer. Any help is much appreciated!