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 when the forward sales estimates request (with pagination) completed without errors but accumulated zero rows - the response had no non-empty 'estimates' array on the first page. Indicates the symbol(s) simply have no sales consensus rather than a request failure.

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/forward_sales_estimates.py:208

                        f"Unauthorized Intrinio request -> {message}"
                    )
                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: IntrinioForwardSalesEstimatesQueryParams,
        data: list[dict],
        **kwargs: Any,
    ) -> list[IntrinioForwardSalesEstimatesData]:
        """Transform the raw data into the standard format."""
        symbols = query.symbol.split(",") if query.symbol else []
        results: list[IntrinioForwardSalesEstimatesData] = []
        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. Verify the ticker has analyst coverage.
  2. Retry without extra filters and with a known covered symbol to sanity-check.
  3. Use an alternate provider for uncovered tickers.
  4. Handle EmptyDataError per symbol when looping over watchlists.
Defensive patterns

Strategy: fallback

Try / catch

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

Prevention

When it happens

Trigger: equity/estimates/forward_sales(symbol=X, provider='intrinio') for a ticker with no analyst sales estimates; the body lacks 'estimates' or it is an empty list, results stays empty, and the guard raises.

Common situations: OTC, foreign, or recently IPO'd tickers without coverage; symbol changes (ticker reuse) breaking coverage continuity; valid key but no Zacks universe membership.

Related errors


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