OpenBB-finance/OpenBB · warning · EmptyDataError
There was an error with the request and was returned empty.
Error message
There was an error with the request and was returned empty.
What it means
Raised in FredUofMichiganFetcher.transform_data (openbb_fred/models/university_of_michigan.py:119) when the DataFrame of observations from the delegated FredSeriesFetcher is empty. The consumer sentiment series (UMCSENT/UMCSENT1, MICH, etc.) are fetched then merged and normalized; empty input means the upstream series request returned nothing, usually rate limiting, invalid key, or a date range outside coverage.
Source
Thrown at openbb_platform/providers/fred/openbb_fred/models/university_of_michigan.py:119
except Exception as e:
raise e from e
return {
"metadata": response.metadata,
"data": [d.model_dump() for d in response.result],
}
@staticmethod
def transform_data(
query: FredUofMichiganQueryParams, data: dict, **kwargs: Any
) -> list[FredUofMichiganData]:
"""Transform data."""
# pylint: disable=import-outside-toplevel
from pandas import DataFrame
df = DataFrame(data.get("data", []))
if df.empty:
raise EmptyDataError(
"There was an error with the request and was returned empty."
)
metadata = data.get("metadata", {})
# Combine the legacy series with the new one.
if "UMCSENT1" in df.columns:
df["UMCSENT"] = df["UMCSENT"].fillna(df["UMCSENT1"])
df = df.drop(columns=["UMCSENT1"])
metadata.pop("UMCSENT1", None)
# Normalize the percent values.
df["MICH"] = df["MICH"] / 100
if query.transform and query.transform not in ["chg", "ch1", "log"]:
df["UMCSENT"] = df["UMCSENT"] / 100
df = df.rename(
columns={"UMCSENT": "consumer_sentiment", "MICH": "inflation_expectation"}
)
records = (View on GitHub (pinned to 3e071fcc2c)
Solutions
- Retry after 60 seconds (rate limiting).
- Set end_date to a published date or clear the date filters.
- Verify UMCSENT via fred_series to confirm availability.
Defensive patterns
Strategy: retry
Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
res = obb.economy.fred.university_of_michigan(start_date=s, end_date=e)
except EmptyDataError:
res = obb.economy.fred.university_of_michigan() Prevention
- Cap end_date at the last published month; preliminary prints lag realtime.
- Cache monthly - the series updates once per month.
When it happens
Trigger: Calling economy/fred university-of-michigan while rate limited; start_date in the future; the legacy UMCSENT/UMCSENT1 series both empty for the window.
Common situations: Bundled FRED batch jobs hitting the request cap; recent-month requests before the preliminary sentiment print is published on FRED.
Related errors
- No data found for the item and region combination. You may a
- There was an error with the request and it was returned empt
- The request was returned empty.
- The request was returned empty.
- The request was returned with no data.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/31103e1208de4090.
Report an issue: GitHub.