OpenBB-finance / OpenBB

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

https://docs.openbb.co/platform/reference/derivatives/futures/curve broken #6631

Closed oldmangreg closed 3 months ago

oldmangreg commented 3 months ago

windows 11, gitbash terminal

mkdir bb_test && cd bb_test && /c/Python3.10.6/python -m venv venv source venv/scripts/activate pip install openbb[all]

create a file called futures_obb_test.py with below content:

import pandas as pd
from openbb import obb

obb.user.preferences.output_type = "dataframe"

data = obb.derivatives.futures.curve(symbol="VX")

print(data)

run $ python futures_obb_test.py

output:

Extensions to add: alpha_vantage@1.3.1, biztoc@1.3.1, cboe@1.3.1, ecb@1.3.1, econometrics@1.4.1, finra@1.3.1, finviz@1.2.1, government_us@1.3.1, multpl@1.0.1, nasdaq@1.3.1, openbb_charting@2.2.1, quantitative@1.3.1, seeking_alpha@1.3.1, stockgrid@1.3.1, technical@1.3.1, tmx@1.2.1, tradier@1.2.1, wsj@1.3.1

Building...
Traceback (most recent call last):
  File "C:\dev\bb_test\futures_obb_test.py", line 6, in <module>
    data = obb.derivatives.futures.curve(symbol="VX")
  File "C:\dev\bb_test\venv\lib\site-packages\openbb_core\app\static\utils\decorators.py", line 90, in wrapper
    raise OpenBBError("\n[Error] -> Unexpected error.").with_traceback(
  File "C:\dev\bb_test\venv\lib\site-packages\pydantic\main.py", line 568, in model_validate
    return cls.__pydantic_validator__.validate_python(
openbb_core.app.model.abstract.error.OpenBBError:
[Error] -> Unexpected error.
deeleeramone commented 3 months ago

Hi there, this issue has been resolved with #6619, but a patch has not been released to PyPI.

oldmangreg commented 3 months ago

Thank you very much for the quick response! If I pip install openbb_nightly would this have the fix?

deeleeramone commented 3 months ago

Thank you very much for the quick response! If I pip install openbb_nightly would this have the fix?

No, unfortunately, the nightly build is not currently activated, cloning the repo and installing via the dev_install.py script is the way to get the patch immediately. Or, copy/pasting the changes from the PR to the file in your site-packages using a text editor.