OpenBB-finance/OpenBB · error · OpenBBError

{str(e) or 'FRED request failed ({type(e).__name__}).'}

Error message

{str(e) or 'FRED request failed ({type(e).__name__}).'}

What it means

Wrapper in FredTipsYieldsFetcher.aextract_data (openbb_fred/models/tips_yields.py:162): the preliminary step that lists TIPS series IDs (get_tips_series) threw a non-OpenBB exception, and it is re-raised as OpenBBError with the original text (or 'FRED request failed (TypeName)') and the original as __cause__. This step scrapes/queries the FRED TIPS yield directory, so failures here are network/parse failures, not 'no data'.

Source

Thrown at openbb_platform/providers/fred/openbb_fred/models/tips_yields.py:162

                params={"release_id": 72}, credentials=credentials
            )
            df = DataFrame([d.model_dump() for d in res])  # type: ignore
            df = df.query("not title.str.contains('DISCONTINUED')").set_index(
                "series_id"
            )

            df["due"] = df.title.apply(lambda x: x.split("Due ")[-1].strip()).apply(
                to_datetime
            )
            df = df[["due", "observation_start", "observation_end", "title"]]
            return df.sort_values(by="due").reset_index()  # type: ignore

        try:
            ids_df = await get_tips_series()
            ids = ids_df.series_id.to_list()
        except Exception as e:
            message = str(e) or f"FRED request failed ({type(e).__name__})."
            raise OpenBBError(message) from e

        # If we are looking for a specific tenor, the request will be smaller.
        if query.maturity:
            ids = [
                i
                for i in ids
                if i.rsplit("DTP", maxsplit=1)[-1].startswith(str(query.maturity))
            ]
        # We split the due date from the title so that we can format it as a datetime.date object.
        due_map = ids_df.set_index("series_id")["due"].dt.date.to_dict()
        # We make a seriesID-title map for later.
        title_map = (
            ids_df.set_index("series_id")["title"]
            .str.replace("Treasury Inflation-Indexed", "TIPS")
            .str.replace("  ", " ")
            .str.strip()
            .to_dict()
        )

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Inspect the wrapped message/__cause__ - it distinguishes network vs parsing failure.
  2. Retry on transient network errors with backoff.
  3. Update openbb-fred if FRED changed the TIPS page structure.
  4. As a stopgap, query the DLTEN30-style TIPS series directly via fred_series.
Defensive patterns

Strategy: retry

Try / catch

from openbb_core.app.model.abstract.error import OpenBBError
import time

for delay in (0, 5, 30):
    if delay:
        time.sleep(delay)
    try:
        res = obb.economy.fred.tips_yields()
        break
    except OpenBBError as e:
        if delay == 30:
            raise RuntimeError(f'TIPS listing failed: {e.__cause__ or e}') from e

Prevention

When it happens

Trigger: The TIPS directory request failing (connection error, timeout); the directory payload changing shape so the title/due-date parsing raises; a proxy blocking the directory URL.

Common situations: The first HTTP hop of the tips-yields call failing in restricted networks; upstream FRED page format changes breaking get_tips_series parsing until a provider update.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/54e09ed9e6af0f3d. Report an issue: GitHub.