OpenBB-finance/OpenBB · error · EmptyDataError
The request returned empty.
Error message
The request returned empty.
What it means
Raised as EmptyDataError by EconDbGdpNominalFetcher.aextract_data after all per-country requests completed but none produced a non-empty final DataFrame, so the results list is still empty. It means the API was reachable yet returned no usable rows for any requested country.
Source
Thrown at openbb_platform/providers/econdb/openbb_econdb/models/gdp_nominal.py:182
final_df = concat(
[gdp, gdp_qoq, gdp_yoy],
axis=1,
)
if final_df.empty:
warn(f"Error: No data returned for {_country}.")
if not final_df.empty:
results.extend(
final_df.reset_index()
.rename(columns={"Country": "country"})
.to_dict(orient="records")
)
chunks = [country[i : i + 6] for i in range(0, len(country), 6)]
for chunk in chunks:
await asyncio.gather(*[get_one_country(c) for c in chunk])
if not results:
raise EmptyDataError("The request returned empty.")
return results
@staticmethod
def transform_data(
query: EconDbGdpNominalQueryParams,
data: list[dict],
**kwargs,
) -> list[EconDbGdpNominalData]:
"""Transform the data."""
# pylint: disable=import-outside-toplevel
from pandas import DataFrame, to_datetime
df = DataFrame(data)
if query.start_date:
df = df[to_datetime(df["date"]) >= to_datetime(query.start_date)]
if query.end_date:View on GitHub (pinned to 3e071fcc2c)
Solutions
- Retry with a major economy first (country='us') to confirm the endpoint itself works.
- Reduce the request to fewer countries to isolate which one returns nothing.
- Try again later — a total-empty result across all countries often indicates an upstream EconDB issue.
- If persistent, inspect the raw API response for your tickers and report an issue to the openbb-econdb provider.
Defensive patterns
Strategy: try-catch
Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
res = obb.economy.gdp_nominal(provider='econdb', country='us')
except EmptyDataError:
logger.warning('EconDB returned no GDP data; retrying with fallback provider')
res = obb.economy.gdp_nominal(provider='oecd', country='united_states') Prevention
- Probe with one major economy before batch queries.
- Have a second provider (oecd/fred) configured as fallback.
- Wrap provider calls so EmptyDataError maps to an explicit no-data path, not a crash.
When it happens
Trigger: economy.gdp_nominal(provider='econdb', country=...) where every country's series response is empty or fails to parse into final_df — e.g. deprecated tickers, temporary upstream data gaps, or all countries erroring silently in get_one_country.
Common situations: Querying countries EconDB has no quarterly nominal GDP series for; upstream schema change breaking the per-country parse; mass-querying many countries where all happen to fail.
Related errors
- The request returned empty.
- The request was returned empty.
- There was an error fetching the data.
- The request returned empty.
- Error: The no data was found for the supplied symbols and co
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/7be3df52696bf1d0.
Report an issue: GitHub.