OpenBB-finance/OpenBB · error · OpenBBError

Unsupported data format.

Error message

Unsupported data format.

What it means

Raised by the economic-indicators model validator when a symbol token (split on commas) contains no '::' separator. Every symbol must encode its dataflow as `dataflow::identifier` because the same identifier can exist in multiple dataflows; without the prefix the provider cannot route the query.

Source

Thrown at openbb_platform/core/openbb_core/app/model/obbject.py:253

                ):
                    sort_columns = False
                    df = DataFrame(r.model_dump(exclude_unset=True, exclude_none=True))  # type: ignore
                else:
                    df = basemodel_to_df(dt, index)
                    sort_columns = False
            # str
            elif isinstance(res, str):
                df = DataFrame([res])
            # List[List | str | int | float] | Dict[str, Dict | List | BaseModel]
            else:
                try:
                    df = DataFrame(res)  # type: ignore[call-overload]
                except ValueError:
                    if isinstance(res, dict):
                        df = DataFrame([res])

            if df is None:
                raise OpenBBError("Unsupported data format.")

            # Set index, if any
            if index is not None and index in df.columns:
                df.set_index(index, inplace=True)

            # Drop columns that are all NaN, but don't rearrange columns
            if sort_columns:
                df.sort_index(axis=1, inplace=True)
            df = df.dropna(axis=1, how="all")

            # Sort by specified column
            if sort_by:
                df.sort_values(
                    by=sort_by,
                    ascending=ascending if ascending is not None else True,
                    inplace=True,
                )

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Qualify the symbol with its dataflow: `symbol='IFS::NGDP_XDC'`.
  2. Find qualified symbols via `available_indicators()` or `list_tables()` and copy them verbatim.
  3. If you have dataflow and identifier separately, join with '::' at the call site.

Example fix

# before
res = obb.economy.economic_indicators(provider='imf', symbol='NGDP_XDC', country='USA')

# after
res = obb.economy.economic_indicators(provider='imf', symbol='IFS::NGDP_XDC', country='USA')
Defensive patterns

Strategy: validation

Validate before calling

import re

SYMBOL_RE = re.compile(r'^\w+::.+$')

def validate_symbols(symbol: str) -> str:
    bad = [s for s in symbol.split(',') if not SYMBOL_RE.match(s.strip())]
    if bad:
        raise ValueError(f'Symbols must be dataflow::identifier — invalid: {bad}')
    return symbol

symbol = validate_symbols(symbol)

Type guard

import re

def is_qualified_symbol(s: str) -> bool:
    s = s.strip()
    return '::' in s and bool(re.match(r'^\w+::.+$', s))

Prevention

When it happens

Trigger: Passing a bare indicator code like `symbol='NGDP_XDC'`, a bare table like `symbol='CPI'`, or the old pre- '::' format from earlier provider versions. Only checks the separator's presence, so 'IFS::' style emptiness is a separate error (empty identifier).

Common situations: Copying indicator codes from IMF SDMX docs that don't use the dataflow-qualified form; migrating from an older openbb-imf API that accepted bare codes; user input from a field that only captures the indicator part.

Related errors


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