{"record":{"id":"7b573c4b334aaed5","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-for-the-item-and-region-combination","errorCode":null,"errorMessage":"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.","messagePattern":"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\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/fred/openbb_fred/models/retail_prices.py","lineNumber":319,"sourceCode":"        series: list = []\n        items_list = items_dict.get(query.item, [query.item])\n        for k, v in all_symbols.items():\n            for price in list(set(items_list)):\n                if price.replace(\"_\", \" \") in v.lower():\n                    series.append(k)\n\n        response = await FredSeriesFetcher.fetch_data(\n            dict(\n                symbol=\",\".join(series),\n                start_date=query.start_date,\n                end_date=query.end_date,\n                frequency=frequency,\n                transform=transform,\n            ),\n            credentials,\n        )\n        if not response.result:  # type: ignore\n            raise EmptyDataError(\n                \"No data found for the item and region combination.\"\n                + \" You may also be experiencing rate limiting.\"\n                + \" Please adjust the parameters or try again in a few minutes.\"\n            )\n        return {\n            \"metadata\": response.metadata,  # type: ignore\n            \"data\": [d.model_dump() for d in response.result],  # type: ignore\n        }\n\n    @staticmethod\n    def transform_data(\n        query: FredRetailPricesQueryParams,\n        data: dict,\n        **kwargs: Any,\n    ) -> AnnotatedResult[list[FredRetailPricesData]]:\n        \"\"\"Transform data.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        import json  # noqa","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fred/openbb_fred/models/retail_prices.py#L301-L337","documentation":"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.","triggerScenarios":"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.","commonSituations":"Free FRED API keys under heavy parallel fetching; typos or swapped item/region codes; date ranges that start after the series was discontinued.","solutions":["Retry the identical call after 60 seconds - if it succeeds, you were rate limited.","Verify the item/region combination exists by resolving the generated series ID with fred_search.","Widen or clear start_date/end_date to cover periods where the series has observations.","Check whether the underlying series was discontinued ( fred_series(symbol=...) metadata )."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.utils.errors import EmptyDataError\nimport time\n\nfor attempt in range(3):\n    try:\n        res = obb.economy.fred.retail_prices(item=item, region=region)\n        break\n    except EmptyDataError:\n        if attempt == 2:\n            raise\n        time.sleep(60)  # ride out FRED rate limiting","preventionTips":["Throttle all FRED calls below 50 requests/minute per API key.","Validate item/region pairs once and cache the resolved series IDs.","Treat a sudden across-the-board EmptyDataError pattern as rate limiting, not bad parameters."],"tags":["fred","retail-prices","rate-limit","empty-data"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}