OpenBB-finance/OpenBB · warning · EmptyDataError
The request was returned empty.
Error message
The request was returned empty.
What it means
Raised in FredSearchFetcher.transform_data (openbb_fred/models/search.py:263) when the extraction step returned an empty list - the FRED search response contained zero series objects. An EmptyDataError: the request was valid and delivered, but matched nothing. Note this is distinct from error 489, which fires after client-side filtering of non-empty results.
Source
Thrown at openbb_platform/providers/fred/openbb_fred/models/search.py:263
if isinstance(response, dict) and "count" in response:
results = response.get("seriess", [])
return results
raise OpenBBError(
f"Unexpected response format. Expected a dictionary, got {type(response)}"
)
@staticmethod
def transform_data(
query: FredSearchQueryParams, data: list[dict], **kwargs: Any
) -> list[FredSearchData]:
"""Transform data."""
# pylint: disable=import-outside-toplevel
from numpy import nan
from pandas import DataFrame, Series
if not data:
raise EmptyDataError("The request was returned empty.")
df = DataFrame(data)
if query.search_type == "release" and query.release_id is None:
df = df.rename(columns={"id": "release_id"})
terms = [term.strip() for term in query.query.split(";")] if query.query else []
tags = (
[tag.strip() for tag in query.tag_names.split(";")]
if query.tag_names and query.search_type != "series_id"
else []
)
terms += tags
if terms and query.search_type != "series_id":
combined_mask = Series([True] * len(df))
for term in terms:
mask = df.apply(View on GitHub (pinned to 3e071fcc2c)
Solutions
- Broaden the query text (fewer/shorter terms).
- Loosen tag_names - remember multiple tags are ANDed; use fewer or run separate searches per tag.
- For release searches, confirm the release has series via fred_search(search_type='release', release_id=...).
Example fix
# before - ANDed tags match nothing obb.economy.fred.search(query='prices', tag_names='cpi;monthly;sa') # after obb.economy.fred.search(query='prices', tag_names='cpi')
Defensive patterns
Strategy: try-catch
Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
res = obb.economy.fred.search(query=query, tag_names=tags)
except EmptyDataError:
res = obb.economy.fred.search(query=query) # retry without the tag filter Prevention
- Remember FRED ANDs multiple tags - search one tag at a time and merge.
- Cache search results; series metadata rarely changes.
When it happens
Trigger: A query string that matches no FRED series text; tag_names combinations no series carries (e.g. tag_names='cpi;housing' where both must apply); a release_id whose release contains zero series.
Common situations: Overly specific multi-term queries; semicolon-separated tags treated as AND by FRED; searching a brand-new release before series are attached to it.
Related errors
- No results found for the provided query.
- No results found for the provided query.
- No results found for '{search_term}'.
- The request was returned with no data.
- No data was found for, {query.country}.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/0f86e1e97633657a.
Report an issue: GitHub.