OpenBB-finance/OpenBB · error · OpenBBError

No indicators specified.

Error message

No indicators specified.

What it means

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.

Source

Thrown at openbb_platform/providers/imf/openbb_imf/models/economic_indicators.py:821

                return {
                    "mode": "table",
                    "data": result.get("data", []),
                    "table_metadata": result.get("table_metadata", {}),
                    "series_metadata": result.get("series_metadata", {}),
                }
            except (ValueError, OpenBBError) as e:
                # Translate IMF dimension codes to user-friendly parameter names
                raise OpenBBError(translate_error_message(str(e))) from e

        else:
            # Indicator mode: support multiple dataflows
            query_builder = ImfQueryBuilder()
            all_data: list[dict] = []
            all_metadata: dict = {}
            indicators_by_df = query._indicators_by_dataflow

            if not indicators_by_df:
                raise OpenBBError("No indicators specified.")

            # Fetch data for each dataflow
            for dataflow, indicator_codes in indicators_by_df.items():
                params = {
                    "COUNTRY": countries_str,
                    "FREQUENCY": frequency,
                }

                # Apply user-specified dimension filters
                if extra_dimensions:
                    params.update(extra_dimensions)

                # Handle transform/unit parameter per dataflow
                if query.transform:
                    transform_val = query.transform.strip().lower()
                    transform_dim, unit_dim, transform_lookup, unit_lookup = (
                        detect_transform_dimension(dataflow)
                    )

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Pass at least one valid indicator code, e.g. `indicator='NGDP_RPCH'` or a comma-separated list.
  2. If you intended the table mode, set the `table` parameter instead of relying on `indicator`.
  3. Debug-print `query._indicators_by_dataflow` before fetching to confirm your indicator string parses into dataflow groups.

Example fix

# before
res = await obb.economy.imf.economic_indicators()  # indicator missing

# after
res = await obb.economy.imf.economic_indicators(indicator='NGDP_RPCH')
Defensive patterns

Strategy: validation

Validate before calling

if not indicator or not indicator.strip():
    raise ValueError('indicator is required for indicator mode')
# if you intend table mode, pass table= instead

Type guard

def has_indicators(q) -> bool:
    return bool(getattr(q, '_indicators_by_dataflow', None))

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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