Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: obb.etf.info("AAPL,XLE", provider="yfinance") function hangs when equity symbol and ETF symbol are combined... #7042

Open
jjfantini opened this issue Feb 25, 2025 · 7 comments

Comments

@jjfantini
Copy link

jjfantini commented Feb 25, 2025

Describe the bug
WHen running obb.etf.info("AAPL,PCT,NVDA,SPY,XLE,XLF", provider="yfinance"), the function hangs for minutes and doesnt complete, not does it timeout, nor give any information on what is going on.

The function hangs as soon as an equity symbol that is not an ETF is put into the symbol parameters. You can input multiple ETF symbols, and data is returned. It used to skip the equity symbols and not return them in the DF. THis behaviour should be standardized.

If you put in just one equity symbol that is not an ETF, we get the correct error.

obb.etf.info("AAPL", provider="yfinance").to_polars()

OpenBBError: 
[Error] -> AAPL is not an ETF.

To Reproduce

from openbb import bob
obb.etf.info("AAPL,XLE,XLF", provider="yfinance")

Screenshots
Image

Desktop (please complete the following information):
Version: 0.46.4
VSCode Version: 1.96.2
Commit: db71624816f6d52f6e54f47c37cdc7df23e22620
Date: 2025-02-25T07:28:07.050Z
Electron: 32.2.6
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Darwin arm64 24.4.0
Python: 3.12.9
OpenBB: 4.4.0

Additional context
Add any other information that you think could be useful for us.

@jjfantini jjfantini changed the title [Bug]: obb.etf.info("AAPL,PCT,NVDA,SPY,XLE,XLF", provider="yfinance") function hangs... [Bug]: obb.etf.info("AAPL,XLE", provider="yfinance") function hangs when equity symbol and ETF symbol are combined... Feb 25, 2025
@deeleeramone
Copy link
Contributor

What version of yFinance do you have installed? If it is not the latest, you will need to update it.

Image

@jjfantini
Copy link
Author

jjfantini commented Feb 25, 2025

I have the latest version, but I am still getting the error and the function is still hanging. Can i get any other logs for you?

poetry show yfinance
 name         : yfinance                                     
 version      : 0.2.54                                       
 description  : Download market data from Yahoo! Finance API 

dependencies
 - beautifulsoup4 >=4.11.1
 - frozendict >=2.3.4
 - multitasking >=0.0.7
 - numpy >=1.16.5
 - pandas >=1.3.0
 - peewee >=3.16.2
 - platformdirs >=2.0.0
 - pytz >=2022.5
 - requests >=2.31

required by
 - lumibot requires >=0.2.54
 - openbb-yfinance requires >=0.2.54,<0.3.0
 - quantstats-lumi requires >=0.2.36

@jjfantini
Copy link
Author

Image

@deeleeramone
Copy link
Contributor

Can you use the function without to to_polars() method please, and not in a Jupyter notebook?

I'm not able to recreate, the function appears to work as expected.

Image

@jjfantini
Copy link
Author

I still ge tthe same issue when I dont use .to_polars in the Jupyter notebook. SUrely this should work in the Notebook? I use openBB quite a bit in notebooks. I have the same issue on the CLI. The functions hangs and nothing happens for minutes until the kernel crashes or I kill the terminal.

Image

@jjfantini
Copy link
Author

It's still hanging, so I am killing temrinal...

@deeleeramone
Copy link
Contributor

This seems like a network or other type of issue related to your system configuration. There's not really anything to "hang" except for HTTP requests. An incorrectly configured proxy network will cause this type of thing to happen.

How are you connected to the internet? What environment variables to you set? What are all the other factors?

Have you already tried deleting your environment, cleared your caches, and built a new one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants