OpenBB-finance/OpenBB · warning · EmptyDataError

The response was returned empty.

Error message

The response was returned empty.

What it means

EmptyDataError raised when the historical market cap request finished with neither results nor messages - every symbol returned a 200 response with an empty/no 'historical_data' dict and no error text. Distinguished from error 694: here nothing notable happened at all, the API was simply silent.

Source

Thrown at openbb_platform/providers/intrinio/openbb_intrinio/models/historical_market_cap.py:138

                data = response.get("historical_data", {})
                result = [
                    {"symbol": symbol, **item} for item in data if item.get("value")
                ]
                results.extend(result)

            return

        await asyncio.gather(*[get_one(symbol) for symbol in symbols])

        if messages and not results:
            raise OpenBBError(messages)

        if messages and results:
            for message in messages:
                warn(message)

        if not results:
            raise EmptyDataError("The response was returned empty.")

        return results

    @staticmethod
    def transform_data(
        query: IntrinioHistoricalMarketCapQueryParams, data: list[dict], **kwargs: Any
    ) -> list[IntrinioHistoricalMarketCapData]:
        """Return the transformed data."""
        return [
            IntrinioHistoricalMarketCapData.model_validate(d)
            for d in sorted(data, key=lambda x: x["date"])
        ]

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Widen or adjust the start_date/end_date range to overlap known coverage.
  2. Test the symbol on other Intrinio endpoints to confirm universe membership.
  3. Retry later if Intrinio is having data publication issues.
  4. Fall back to computing market cap from shares outstanding times price via another provider.
Defensive patterns

Strategy: validation

Validate before calling

from datetime import date
# ensure the requested window plausibly overlaps data availability
assert query_start < date.today() and query_end >= date(2000, 1, 1), 'date window outside coverage'

Try / catch

from openbb_core.provider.exceptions import EmptyDataError
try:
    res = obb.equity.fundamental.market_cap(symbol=sym, provider='intrinio')
except EmptyDataError:
    res = obb.equity.fundamental.market_cap(symbol=sym, provider='fmp')  # or compute shares*price

Prevention

When it happens

Trigger: equity/fundamental/market_cap with provider='intrinio' where each symbol's response is a dict without the 'historical_data' key or with all entries filtered out by the item.get('value') check, and no 'Cannot look up' error was triggered.

Common situations: Date ranges entirely outside available history (start_date after latest data); symbols whose market cap series exists only under a different identifier; API returning 200 with empty object during partial outages.

Related errors


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