OpenBB-finance/OpenBB · error · EmptyDataError
There was an error fetching the data.
Error message
There was an error fetching the data.
What it means
EmptyDataError from the EconDB available-indicators model when download_indicators(use_cache) returns an empty DataFrame. The indicator catalog (scraped/cached from EconDB) came back with zero rows, so there is nothing to list.
Source
Thrown at openbb_platform/providers/econdb/openbb_econdb/models/available_indicators.py:93
@staticmethod
def transform_query(params: dict[str, Any]) -> EconDbAvailableIndicatorsQueryParams:
"""Transform query."""
return EconDbAvailableIndicatorsQueryParams(**params)
@staticmethod
async def aextract_data(
query: EconDbAvailableIndicatorsQueryParams,
credentials: dict[str, str] | None,
**kwargs: Any,
) -> list[dict]:
"""Extract data."""
# pylint: disable=import-outside-toplevel
from openbb_econdb.utils.helpers import download_indicators
df = await download_indicators(query.use_cache)
if df.empty:
raise EmptyDataError("There was an error fetching the data.")
return df.sort_values(by="last_date", ascending=False).to_dict(orient="records")
@staticmethod
def transform_data(
query: EconDbAvailableIndicatorsQueryParams,
data: list[dict],
**kwargs: Any,
) -> list[EconDbAvailableIndicatorsData]:
"""Transform data."""
# pylint: disable=import-outside-toplevel
from math import isnan
def clean_nan(d: dict) -> dict:
"""Replace nan values with None for Pydantic validation."""
return {
k: None if isinstance(v, float) and isnan(v) else v
for k, v in d.items()
}View on GitHub (pinned to 3e071fcc2c)
Solutions
- Retry with use_cache=False to force a fresh catalog download.
- Verify reachability of econdb.com from the same environment (curl the indicators endpoint).
- Update the openbb-econdb provider — catalog scraping breaks when the site layout changes.
- Clear the user HTTP cache directory if a poisoned empty response is stored.
Example fix
# before inds = obb.economy.indicators(provider="econdb") # after inds = obb.economy.indicators(provider="econdb", use_cache=False)
Defensive patterns
Strategy: retry
Try / catch
from openbb_core.provider.utils.errors import EmptyDataError
try:
inds = obb.economy.indicators(provider="econdb")
except EmptyDataError:
inds = obb.economy.indicators(provider="econdb", use_cache=False) # bypass poisoned cache Prevention
- Retry once with use_cache=False to rule out a cached empty catalog.
- Verify econdb.com reachability from the runtime environment.
- Keep openbb-econdb current; the catalog scraper breaks on site redesigns.
When it happens
Trigger: Calling obb.economy.indicators(provider='econdb') (available indicators endpoint) when the catalog fetch failed silently or the cached copy is empty/corrupt. With use_cache=True, a previously stored empty response keeps reproducing the error.
Common situations: First run behind a network that blocks econdb.com; stale/corrupt SQLite HTTP cache from an interrupted earlier fetch; EconDB site redesign breaking the scraper in an older provider version.
Related errors
- The request returned empty.
- No valid indicators provided. Please choose from: ",".join(I
- Error: The no data was found for the supplied symbols and co
- The request returned empty.
- The request returned empty.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/de306a8e4617c443.
Report an issue: GitHub.