{"record":{"id":"1b956d4dbe125f9e","repo":"OpenBB-finance/OpenBB","slug":"no-data-returned-for-the-given-query-parameters-1b956d","errorCode":null,"errorMessage":"No data returned for the given query parameters.","messagePattern":"No data returned for the given query parameters\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"warning","filePath":"openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py","lineNumber":933,"sourceCode":"\n            return {\n                \"mode\": \"indicator\",\n                \"data\": all_data,\n                \"metadata\": all_metadata,\n            }\n\n    @staticmethod\n    def transform_data(\n        query: ImfEconomicIndicatorsQueryParams,\n        data: dict,\n        **kwargs: Any,\n    ) -> AnnotatedResult[list[ImfEconomicIndicatorsData]]:\n        \"\"\"Transform the data.\"\"\"\n        mode = data.get(\"mode\", \"indicator\")\n        row_data = data.get(\"data\", [])\n\n        if not row_data:\n            raise EmptyDataError(\"No data returned for the given query parameters.\")\n\n        result: list = []\n        metadata: dict = {}\n\n        if mode == \"table\":\n            metadata = {\n                \"table\": data.get(\"table_metadata\", {}),\n                \"series\": data.get(\"series_metadata\", {}),\n            }\n        else:\n            metadata = data.get(\"metadata\", {})\n\n        for item in row_data:\n            # Filter by date range if needed (IMF API date filtering can be inconsistent)\n            item_date = item.get(\"TIME_PERIOD\") or item.get(\"date\")\n\n            # Normalize date format for comparison and storage\n            if item_date:","sourceCodeStart":915,"sourceCodeEnd":951,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py#L915-L951","documentation":"Raised in `transform_data` when the fetch stage produced zero rows (`data['data']` is empty). `EmptyDataError` is the provider-standard signal that the request was technically valid and executed, but the IMF returned no observations, so the platform can report 'no data' distinctly from a transport or validation failure.","triggerScenarios":"A combination of country, indicator, frequency, transform, and date filters that matches no IMF observations: e.g. a quarterly series requested with annual frequency, a country that does not report the indicator, or a date window entirely outside the series' coverage.","commonSituations":"Requesting recent periods for a series published with a long lag; using an ISO country code the dataflow does not cover; overly narrow start_date/end_date; wrong frequency for the indicator.","solutions":["Widen or remove start_date/end_date to cover the series' actual publication range.","Verify the country code is reported for that indicator (check the IMF series page).","Try a different `frequency` (A/Q/M) matching how the indicator is published.","Drop transform/unit filters in case they select an unpopulated dimension slice."],"exampleFix":"# before\neconomic_indicators(indicator='NGDP_RPCH', country='W00', start_date='2025-01-01')\n\n# after\neconomic_indicators(indicator='NGDP_RPCH', country='US', start_date='2000-01-01')","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from openbb_core.provider.abstract.fetcher import EmptyDataError\ntry:\n    res = await obb.economy.imf.economic_indicators(...)\nexcept EmptyDataError:\n    res = []  # or fall back to a wider query","preventionTips":["Probe coverage with one broad call before looping over fine-grained queries","Validate country codes and frequency against the indicator's metadata","Treat EmptyDataError as an expected, non-fatal outcome in batch pipelines"],"tags":["imf","no-data","empty-data","query-params"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}