OpenBB-finance / OpenBB

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

[Bug] Retrieving BLS series JTS000000000000000QUR leads to an unexpected error #6688

Closed l2edzl3oy closed 1 month ago

l2edzl3oy commented 1 month ago

Describe the bug When using the obb.economy.survey.bls_series() function, retrieving BLS series JTS000000000000000QUR leads to an unexpected error.

BLS series CES0000000001 is working though.

To Reproduce

from openbb import obb

obb.user.credentials.bls_api_key = "ABC"

obb.economy.survey.bls_series(
    provider="bls", symbol="JTS000000000000000QUR"
)

Screenshots

File [~\Miniconda3\envs\inflation\Lib\site-packages\openbb_core\app\static\utils\decorators.py:90](http://localhost:8888/lab/tree/~/Miniconda3/envs/inflation/Lib/site-packages/openbb_core/app/static/utils/decorators.py#line=89), in exception_handler.<locals>.wrapper(*f_args, **f_kwargs)
     88 if isinstance(e, OpenBBError):
     89     raise OpenBBError(f"\n[Error] -> {str(e)}").with_traceback(tb) from None
---> 90 raise OpenBBError("\n[Error] -> Unexpected error.").with_traceback(
     91     tb
     92 ) from None

File [~\Miniconda3\envs\inflation\Lib\site-packages\openbb_bls\utils\helpers.py:115](http://localhost:8888/lab/tree/~/Miniconda3/envs/inflation/Lib/site-packages/openbb_bls/utils/helpers.py#line=114), in get_bls_timeseries(api_key, series_ids, start_year, end_year, calculations, catalog, annual_average, aspects)
    113 new_d["symbol"] = seriesID
    114 title = metadata[seriesID].get("series_title") if catalog else None
--> 115 title = title + (" (Annual Average)" if month == "13" else "")
    116 if title:
    117     new_d["title"] = title

OpenBBError: 
[Error] -> Unexpected error.

Desktop (please complete the following information):

Additional context

N/A

deeleeramone commented 1 month ago

Hello,

Thanks for the report, and it should be resolved by #6690!

l2edzl3oy commented 1 month ago

Thanks for the quick fix!