{"record":{"id":"71cee54cfa9eda7c","repo":"OpenBB-finance/OpenBB","slug":"unsupported-data-format","errorCode":null,"errorMessage":"Unsupported data format.","messagePattern":"Unsupported data format\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/core/openbb_core/app/model/obbject.py","lineNumber":253,"sourceCode":"                ):\n                    sort_columns = False\n                    df = DataFrame(r.model_dump(exclude_unset=True, exclude_none=True))  # type: ignore\n                else:\n                    df = basemodel_to_df(dt, index)\n                    sort_columns = False\n            # str\n            elif isinstance(res, str):\n                df = DataFrame([res])\n            # List[List | str | int | float] | Dict[str, Dict | List | BaseModel]\n            else:\n                try:\n                    df = DataFrame(res)  # type: ignore[call-overload]\n                except ValueError:\n                    if isinstance(res, dict):\n                        df = DataFrame([res])\n\n            if df is None:\n                raise OpenBBError(\"Unsupported data format.\")\n\n            # Set index, if any\n            if index is not None and index in df.columns:\n                df.set_index(index, inplace=True)\n\n            # Drop columns that are all NaN, but don't rearrange columns\n            if sort_columns:\n                df.sort_index(axis=1, inplace=True)\n            df = df.dropna(axis=1, how=\"all\")\n\n            # Sort by specified column\n            if sort_by:\n                df.sort_values(\n                    by=sort_by,\n                    ascending=ascending if ascending is not None else True,\n                    inplace=True,\n                )\n","sourceCodeStart":235,"sourceCodeEnd":271,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/app/model/obbject.py#L235-L271","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Qualify the symbol with its dataflow: `symbol='IFS::NGDP_XDC'`.","Find qualified symbols via `available_indicators()` or `list_tables()` and copy them verbatim.","If you have dataflow and identifier separately, join with '::' at the call site."],"exampleFix":"# before\nres = obb.economy.economic_indicators(provider='imf', symbol='NGDP_XDC', country='USA')\n\n# after\nres = obb.economy.economic_indicators(provider='imf', symbol='IFS::NGDP_XDC', country='USA')","handlingStrategy":"validation","validationCode":"import re\n\nSYMBOL_RE = re.compile(r'^\\w+::.+$')\n\ndef validate_symbols(symbol: str) -> str:\n    bad = [s for s in symbol.split(',') if not SYMBOL_RE.match(s.strip())]\n    if bad:\n        raise ValueError(f'Symbols must be dataflow::identifier — invalid: {bad}')\n    return symbol\n\nsymbol = validate_symbols(symbol)","typeGuard":"import re\n\ndef is_qualified_symbol(s: str) -> bool:\n    s = s.strip()\n    return '::' in s and bool(re.match(r'^\\w+::.+$', s))","tryCatchPattern":null,"preventionTips":["Never pass a bare indicator code — always prefix its dataflow (IFS::, STA::, ...).","Harvest symbols from available_indicators()/list_tables() so they are correctly qualified by construction."],"tags":["imf","openbb","validation","symbol","format","pydantic"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}