OpenBB-finance/OpenBB · error · EmptyDataError
The request returned empty.
Error message
The request returned empty.
What it means
EmptyDataError from EconDbGdpRealFetcher.aextract_data: every per-country request ran (in chunks of 6 concurrent tasks) but none yielded a non-empty final DataFrame, so results stays empty. The API answered but returned no parseable real-GDP rows for any requested country.
Source
Thrown at openbb_platform/providers/econdb/openbb_econdb/models/gdp_real.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: EconDbGdpRealQueryParams,
data: list[dict],
**kwargs,
) -> list[EconDbGdpRealData]:
"""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
- Test with country='us' to verify the endpoint works at all.
- Query one country at a time to find which ones return nothing.
- Retry later if all countries suddenly return empty (upstream issue).
- Report to the openbb-econdb maintainers if a previously working country persistently fails.
Defensive patterns
Strategy: try-catch
Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
res = obb.economy.gdp_real(provider='econdb', country=','.join(batch))
except EmptyDataError:
if len(batch) == 1:
logger.warning(f'econdb has no real GDP for {batch[0]}; skipping')
else:
for c in batch: # bisect to find the failing country
... Prevention
- Query countries in small batches and bisect failures.
- Keep a known-good country list from a first successful full pull.
- Treat total-empty results across many countries as an upstream signal, not a parameter bug.
When it happens
Trigger: economy.gdp_real(provider='econdb', country=...) with countries lacking real GDP series on EconDB, or an upstream response-format change making every per-country parse produce an empty final_df.
Common situations: Small/micro states with no quarterly real GDP series; a batch request where every country in the batch is unsupported; upstream EconDB outage returning empty payloads.
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/13962b8c0ac1001f.
Report an issue: GitHub.