{"record":{"id":"701ca7b35355d8d5","repo":"OpenBB-finance/OpenBB","slug":"no-indicators-specified","errorCode":null,"errorMessage":"No indicators specified.","messagePattern":"No indicators specified\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py","lineNumber":821,"sourceCode":"                return {\n                    \"mode\": \"table\",\n                    \"data\": result.get(\"data\", []),\n                    \"table_metadata\": result.get(\"table_metadata\", {}),\n                    \"series_metadata\": result.get(\"series_metadata\", {}),\n                }\n            except (ValueError, OpenBBError) as e:\n                # Translate IMF dimension codes to user-friendly parameter names\n                raise OpenBBError(translate_error_message(str(e))) from e\n\n        else:\n            # Indicator mode: support multiple dataflows\n            query_builder = ImfQueryBuilder()\n            all_data: list[dict] = []\n            all_metadata: dict = {}\n            indicators_by_df = query._indicators_by_dataflow\n\n            if not indicators_by_df:\n                raise OpenBBError(\"No indicators specified.\")\n\n            # Fetch data for each dataflow\n            for dataflow, indicator_codes in indicators_by_df.items():\n                params = {\n                    \"COUNTRY\": countries_str,\n                    \"FREQUENCY\": frequency,\n                }\n\n                # Apply user-specified dimension filters\n                if extra_dimensions:\n                    params.update(extra_dimensions)\n\n                # Handle transform/unit parameter per dataflow\n                if query.transform:\n                    transform_val = query.transform.strip().lower()\n                    transform_dim, unit_dim, transform_lookup, unit_lookup = (\n                        detect_transform_dimension(dataflow)\n                    )","sourceCodeStart":803,"sourceCodeEnd":839,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py#L803-L839","documentation":"Raised in the multi-indicator code path of the IMF economic_indicators fetcher when `query._indicators_by_dataflow` resolves to an empty mapping. The fetcher splits the `indicator` parameter into per-dataflow code groups; if the parameter was omitted, blank, or normalized away to nothing, there is nothing to query and it raises immediately rather than issuing a meaningless request.","triggerScenarios":"Calling `ImfEconomicIndicatorsQueryParams`-driven fetch with no `indicator` (and not in table mode), an empty string `indicator=''`, or an indicator string that the parsing helper reduces to an empty dict. Also reachable if `query._indicators_by_dataflow` is unset because the field was bypassed via direct construction.","commonSituations":"Building the query programmatically and forgetting to set `indicator`; passing an empty list from a variable that was supposed to be populated upstream; copy-pasting a table-mode call (which uses `table=`) while removing the table argument.","solutions":["Pass at least one valid indicator code, e.g. `indicator='NGDP_RPCH'` or a comma-separated list.","If you intended the table mode, set the `table` parameter instead of relying on `indicator`.","Debug-print `query._indicators_by_dataflow` before fetching to confirm your indicator string parses into dataflow groups."],"exampleFix":"# before\nres = await obb.economy.imf.economic_indicators()  # indicator missing\n\n# after\nres = await obb.economy.imf.economic_indicators(indicator='NGDP_RPCH')","handlingStrategy":"validation","validationCode":"if not indicator or not indicator.strip():\n    raise ValueError('indicator is required for indicator mode')\n# if you intend table mode, pass table= instead","typeGuard":"def has_indicators(q) -> bool:\n    return bool(getattr(q, '_indicators_by_dataflow', None))","tryCatchPattern":null,"preventionTips":["Assert required parameters at your API boundary before building provider queries","Distinguish table mode (table=) from indicator mode (indicator=) explicitly"],"tags":["imf","query-params","validation","missing-argument"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}