OpenBB-finance/OpenBB · warning · EmptyDataError
The request was returned with no data.
Error message
The request was returned with no data.
What it means
Raised by FredAmeriborFetch.transform_data when data['data'] is falsy - the FRED series fetch returned a payload whose 'data' mapping (date -> AMERIBOR rates) is empty, so there is nothing to melt into observations. The check happens before the pandas melt/pivot that builds the AnnotatedResult.
Source
Thrown at openbb_platform/providers/fred/openbb_fred/models/ameribor.py:163
raise e from e
return {
"metadata": response.metadata, # type: ignore
"data": [d.model_dump() for d in response.result], # type: ignore
}
@staticmethod
def transform_data(
query: FredAmeriborQueryParams,
data: dict,
**kwargs: Any,
) -> AnnotatedResult[list[FredAmeriborData]]:
"""Transform data."""
# pylint: disable=import-outside-toplevel
from pandas import Categorical, DataFrame
if not data["data"]:
raise EmptyDataError("The request was returned with no data.")
metadata = data.get("metadata", {})
maturity_dict = {
"AMERIBOR": "overnight",
"AMBOR30": "day_30",
"AMBOR90": "day_90",
"AMBOR30T": "day_30",
"AMBOR90T": "day_90",
}
df = DataFrame(data.get("data", []))
# Flatten data
df = df.melt(id_vars="date", var_name="symbol", value_name="value").query(
"value.notnull()"
)
df = df.rename(columns={"value": "rate"}).sort_values(by="date")
# Normalize percent values
df["rate"] = df["rate"].astype(float) / 100
View on GitHub (pinned to 3e071fcc2c)
Solutions
- Check the series on fred.stlouisfed.org (AMERIBOR, AMBOR30, AMBOR90) for the actual observation date range and query within it
- Widen start_date/end_date or remove them to get the full history
- Shift the requested window a few days earlier to account for publication lag
- Retry later - FRED observations can lag real time by days
Defensive patterns
Strategy: validation
Validate before calling
from pandas import DataFrame
raw = fetch_fred_series(['AMERIBOR', 'AMBOR30', 'AMBOR90'], start_date, end_date)
assert raw.get('data'), 'no AMERIBOR observations in window - widen dates' Type guard
def has_observations(payload: dict) -> bool:
return bool(payload.get("data")) Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
obs = await obb.fixedincome.ameribor(provider='fred', start_date=s, end_date=e).await_to_list()
except EmptyDataError:
obs = [] # widen window or shift earlier Prevention
- Check each AMERIBOR tenor's observation range on fred.stlouisfed.org before querying
- Account for FRED publication lag - avoid windows ending today
- Query full history once and filter locally instead of guessing narrow windows
When it happens
Trigger: Querying the AMERIBOR fetcher with a date range outside FRED's coverage for those series IDs (AMBOR30/AMBOR90 etc.), or a start_date after the series' last observation (some AMERIBOR tenors were discontinued).
Common situations: Requesting recent dates for discontinued AMERIBOR tenor series (e.g. AMBOR30T/AMBOR90T replaced over time); overly narrow date windows between business days; FRED series temporarily empty during publication lags.
Related errors
- No data found for the given query. Try adjusting the paramet
- Error: The no data was found for the supplied symbols and co
- No data was found for the supplied date range and countries.
- No data was found for the supplied date range and countries.
- No data found for the provided dates. Data has a range from
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/ef37f6941e40455e.
Report an issue: GitHub.