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(provider='fmp') function is broken. #7043

Closed
jjfantini opened this issue Feb 25, 2025 · 1 comment · Fixed by #7044
Closed

[Bug]: obb.etf.info(provider='fmp') function is broken. #7043

jjfantini opened this issue Feb 25, 2025 · 1 comment · Fixed by #7044

Comments

@jjfantini
Copy link

Describe the bug
etf.info(provider='fmp') route is broken.

To Reproduce
Run the example from the docs:

obb.etf.info(symbol='SPY', provider='fmp')


---------------------------------------------------------------------------
OpenBBError                               Traceback (most recent call last)
Cell In[14], line 1
----> 1 obb.etf.info(symbol='SPY', provider='fmp')

File ~/github/humblFINANCE-org/humblDATA/menv/lib/python3.12/site-packages/openbb_core/app/static/utils/decorators.py:101, in exception_handler.<locals>.wrapper(*f_args, **f_kwargs)
     99         raise OpenBBError(f"\n[Error] -> {e}").with_traceback(tb) from None
    100     if isinstance(e, Exception):
--> 101         raise OpenBBError(
    102             f"\n[Unexpected Error] -> {e.__class__.__name__} -> {e}"
    103         ).with_traceback(tb) from None
    105 return None

File ~/github/humblFINANCE-org/humblDATA/menv/lib/python3.12/site-packages/openbb_fmp/models/etf_info.py:118, in FMPEtfInfoFetcher.transform_data(query, data, **kwargs)
    116 transformed: List[FMPEtfInfoData] = []
    117 for d in data:
--> 118     if d.get("sectorsList"):
    119         d.pop("sectorsList")
    120     transformed.append(FMPEtfInfoData.model_validate(d))

OpenBBError: 
[Unexpected Error] -> AttributeError -> 'str' object has no attribute 'get'

Screenshots

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.

@deeleeramone
Copy link
Contributor

The error you are seeing is from an unhandled error message returned by FMP. The fix will now raise an UnauthorizedError.

[Error] -> Unauthorized FMP request -> Exclusive Endpoint : This endpoint is not available under your current subscription agreement, please visit our subscription page to upgrade your plan or contact us at https://site.financialmodelingprep.com/developer/docs/pricing

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

Successfully merging a pull request may close this issue.

2 participants