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] Retrieving BLS series JTS000000000000000QUR leads to an unexpected error #6688

Closed
l2edzl3oy opened this issue Sep 24, 2024 · 2 comments · Fixed by #6690
Closed

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

l2edzl3oy opened this issue Sep 24, 2024 · 2 comments · Fixed by #6690

Comments

@l2edzl3oy
Copy link

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):

  • OS: Windows 10 Enterprise
  • Python version 3.12.4

Additional context

N/A

@deeleeramone
Copy link
Contributor

Hello,

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

@l2edzl3oy
Copy link
Author

Thanks for the quick fix!

github-merge-queue bot pushed a commit that referenced this issue Sep 25, 2024
* fix title string concactenation

* too-many-positional-arguments
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