OpenBB-finance/OpenBB · warning · EmptyDataError

The request was successful but was returned empty.

Error message

The request was successful but was returned empty.

What it means

EmptyDataError raised after a successful forward EPS estimates request when the callback and its pagination loop collected zero rows (empty 'estimates' list on every page). The HTTP exchange succeeded and no error body was returned, but there is no data to transform.

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/forward_eps_estimates.py:190

                    )
                raise OpenBBError(f"Error: {error} -> {message}")

            if data.get("estimates") and len(data.get("estimates")) > 0:  # type: ignore
                results.extend(data.get("estimates"))  # type: ignore
                while data.get("next_page"):  # type: ignore
                    next_page = data["next_page"]  # type: ignore
                    next_url = f"{url}&next_page={next_page}"
                    data = await amake_request(next_url, session=session, **kwargs)
                    if "estimates" in data and len(data.get("estimates")) > 0:  # type: ignore
                        results.extend(data.get("estimates"))  # type: ignore
            return results

        url = f"{BASE_URL}&{query_str}&api_key={api_key}"

        results = await amake_request(url, response_callback=fetch_callback, **kwargs)  # type: ignore

        if not results:
            raise EmptyDataError("The request was successful but was returned empty.")

        return results

    @staticmethod
    def transform_data(
        query: IntrinioForwardEpsEstimatesQueryParams,
        data: list[dict],
        **kwargs: Any,
    ) -> list[IntrinioForwardEpsEstimatesData]:
        """Transform the raw data into the standard format."""
        symbols = query.symbol.split(",") if query.symbol else []
        results: list[IntrinioForwardEpsEstimatesData] = []
        for item in sorted(
            data,
            key=lambda item: (  # type: ignore
                (
                    symbols.index(item.get("symbol")) if item.get("symbol") in symbols else len(symbols),  # type: ignore
                    item.get("date"),

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Confirm the ticker has analyst coverage at all (news/analyst ratings endpoints).
  2. Fall back to another provider for the same symbol (fmp, benzinga).
  3. Test a known covered symbol like AAPL to verify the pipeline works.
  4. If you batch symbols, catch EmptyDataError per symbol instead of failing the whole batch.

Example fix

# before
 df = obb.equity.estimates.forward_eps(symbol='XYZ', provider='intrinio').to_df()

# after
from openbb_core.app.model.obbject import OBBject  # noqa
try:
    df = obb.equity.estimates.forward_eps(symbol='XYZ', provider='intrinio').to_df()
except Exception as e:
    if 'returned empty' in str(e):
        df = obb.equity.estimates.forward_eps(symbol='XYZ', provider='fmp').to_df()
    else:
        raise
Defensive patterns

Strategy: fallback

Validate before calling

# cheap coverage probe: ratings/estimates count for the ticker
try:
    has_coverage = bool(obb.equity.estimates.consensus(symbol=sym, provider='intrinio').results)
except Exception:
    has_coverage = False

Try / catch

from openbb_core.provider.exceptions import EmptyDataError
try:
    df = obb.equity.estimates.forward_eps(symbol=sym, provider='intrinio').to_df()
except EmptyDataError:
    df = obb.equity.estimates.forward_eps(symbol=sym, provider='fmp').to_df()

Prevention

When it happens

Trigger: equity/estimates/forward_eps with provider=intrinio for a symbol with no analyst EPS consensus at all, or where all pages return 'estimates': [] (or the key absent), so results stays empty.

Common situations: Thinly covered or OTC tickers with no forward EPS estimates; requesting estimates right after a symbol change before analysts migrate coverage; symbol valid but not in Intrinio's Zacks universe.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/0aea47fe11f27658. Report an issue: GitHub.