OpenBB-finance/OpenBB · warning · EmptyDataError

No data found for the item and region combination. You may a

Error message

No data found for the item and region combination. You may also be experiencing rate limiting. Please adjust the parameters or try again in a few minutes.

What it means

Raised in FredRetailPricesFetcher (openbb_fred/models/retail_prices.py:319) when the delegated FredSeriesFetcher returns an empty result for the item/region series combination. The message deliberately mentions rate limiting because FRED frequently returns empty payloads (HTTP 200 with no observations) when the API key is over its request limit, which is indistinguishable from a genuinely nonexistent series at this layer. It is an EmptyDataError, so the provider treats 'no data' as a terminal condition for the call.

Source

Thrown at openbb_platform/providers/fred/openbb_fred/models/retail_prices.py:319

        series: list = []
        items_list = items_dict.get(query.item, [query.item])
        for k, v in all_symbols.items():
            for price in list(set(items_list)):
                if price.replace("_", " ") in v.lower():
                    series.append(k)

        response = await FredSeriesFetcher.fetch_data(
            dict(
                symbol=",".join(series),
                start_date=query.start_date,
                end_date=query.end_date,
                frequency=frequency,
                transform=transform,
            ),
            credentials,
        )
        if not response.result:  # type: ignore
            raise EmptyDataError(
                "No data found for the item and region combination."
                + " You may also be experiencing rate limiting."
                + " Please adjust the parameters or try again in a few minutes."
            )
        return {
            "metadata": response.metadata,  # type: ignore
            "data": [d.model_dump() for d in response.result],  # type: ignore
        }

    @staticmethod
    def transform_data(
        query: FredRetailPricesQueryParams,
        data: dict,
        **kwargs: Any,
    ) -> AnnotatedResult[list[FredRetailPricesData]]:
        """Transform data."""
        # pylint: disable=import-outside-toplevel
        import json  # noqa

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Retry the identical call after 60 seconds - if it succeeds, you were rate limited.
  2. Verify the item/region combination exists by resolving the generated series ID with fred_search.
  3. Widen or clear start_date/end_date to cover periods where the series has observations.
  4. Check whether the underlying series was discontinued ( fred_series(symbol=...) metadata ).
Defensive patterns

Strategy: retry

Try / catch

from openbb_core.provider.utils.errors import EmptyDataError
import time

for attempt in range(3):
    try:
        res = obb.economy.fred.retail_prices(item=item, region=region)
        break
    except EmptyDataError:
        if attempt == 2:
            raise
        time.sleep(60)  # ride out FRED rate limiting

Prevention

When it happens

Trigger: economy/fred retail-prices with an item/region pair that maps to no FRED series; a valid pair whose series has no observations inside the requested start_date/end_date window; burst-calling the endpoint until the FRED key hits its 50-req/min rate cap, after which responses come back empty.

Common situations: Free FRED API keys under heavy parallel fetching; typos or swapped item/region codes; date ranges that start after the series was discontinued.

Related errors


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