{"record":{"id":"5697d4d251afab8a","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-for-the-given-query-try-adjusting-t-5697d4","errorCode":null,"errorMessage":"No data found for the given query. Try adjusting the parameters.","messagePattern":"No data found for the given query\\. Try adjusting the parameters\\.","errorType":"exception","errorClass":"EmptyDataError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/fred/openbb_fred/models/consumer_price_index.py","lineNumber":125,"sourceCode":"        results[\"data\"] = [\n            {country_map.get(k, k): v for k, v in d.items()} for d in result\n        ]\n\n        return results\n\n    @staticmethod\n    def transform_data(\n        query: FREDConsumerPriceIndexQueryParams,\n        data: dict,\n        **kwargs: Any,\n    ) -> AnnotatedResult[list[FREDConsumerPriceIndexData]]:\n        \"\"\"Transform data and validate the model.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        from pandas import DataFrame\n\n        df = DataFrame.from_records(data[\"data\"])\n        if df.empty:\n            raise EmptyDataError(\n                \"No data found for the given query. Try adjusting the parameters.\"\n            )\n        # Flatten the data as a pivot table.\n        df = (\n            df.melt(id_vars=\"date\", var_name=\"country\", value_name=\"value\")\n            .query(\"value.notnull()\")\n            .set_index([\"date\", \"country\"])\n            .sort_index()\n            .reset_index()\n        )\n        # Normalize the percent values.\n        if query.transform in (\"period\", \"yoy\"):\n            df[\"value\"] = df[\"value\"] / 100\n\n        records = df.to_dict(orient=\"records\")\n        metadata = data.get(\"metadata\", {})\n        return AnnotatedResult(\n            result=[FREDConsumerPriceIndexData.model_validate(r) for r in records],","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fred/openbb_fred/models/consumer_price_index.py#L107-L143","documentation":"Error \"No data found for the given query. Try adjusting the parameters.\" thrown in OpenBB-finance/OpenBB.","triggerScenarios":"Thrown at openbb_platform/providers/fred/openbb_fred/models/consumer_price_index.py:125 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Adjust the parameters: widen the date range or change country/transform.","Verify the selected country and frequency combination has published CPI data.","Retry later in case of FRED rate limiting."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}