{"record":{"id":"70884aff4e75b5c7","repo":"OpenBB-finance/OpenBB","slug":"results-not-found","errorCode":null,"errorMessage":"Results not found.","messagePattern":"Results not found\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/core/openbb_core/app/model/obbject.py","lineNumber":169,"sourceCode":"        ascending: Optional[bool]\n            Sort by ascending for each column specified in `sort_by`.\n\n        Returns\n        -------\n        DataFrame\n            Pandas DataFrame.\n        \"\"\"\n        # pylint: disable=import-outside-toplevel\n        from pandas import DataFrame, Series, concat  # noqa\n        from openbb_core.app.utils import basemodel_to_df  # noqa\n\n        def is_list_of_basemodel(items: list[T] | T) -> bool:\n            return isinstance(items, list) and all(\n                isinstance(item, BaseModel) for item in items\n            )\n\n        if self.results is None or not self.results:\n            raise OpenBBError(\"Results not found.\")\n\n        if isinstance(self.results, DataFrame):\n            return self.results\n\n        try:\n            res = self.results\n            df = None\n            sort_columns = True\n\n            # BaseModel\n            if isinstance(res, BaseModel):\n                res_dict = res.model_dump(  # pylint: disable=no-member\n                    exclude_unset=True, exclude_none=True\n                )\n                # Model is serialized as a dict[str, list] or list[dict]\n                if (\n                    (\n                        isinstance(res_dict, dict)","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/app/model/obbject.py#L151-L187","documentation":"Raised by the economic-indicators model validator when no country can be determined: the `country` field is empty AND no dimension_values entry used one of the country dimension IDs (COUNTRY, REF_AREA, JURISDICTION, AREA), which would have been consumed into `self.country` earlier in the validator. Country is mandatory for IMF data queries, so validation aborts.","triggerScenarios":"Calling the endpoint with a symbol but neither `country` nor country-bearing `dimension_values`, e.g. `symbol='IFS::NGDP_XDC'` alone. Also when `dimension_values=['INDICATOR:NGDP_XDC']` is passed — INDICATOR is not a country dimension, so nothing sets country.","commonSituations":"Coming from other providers where country is optional or defaulted to 'US'; passing dimension_values with wrong dimension IDs (e.g. lowercase 'country:USA' — note IDs are uppercased during parsing so this actually works, but typos like 'CONTRY' don't); assuming the symbol itself encodes the country.","solutions":["Pass `country='USA'` (ISO3) alongside the symbol.","Or supply the country as a dimension: `dimension_values=['COUNTRY:USA']`.","Check the exact dimension ID against the dataflow's structure if using REF_AREA/JURISDICTION variants."],"exampleFix":"# before\nres = obb.economy.economic_indicators(provider='imf', symbol='IFS::NGDP_XDC')\n\n# after\nres = obb.economy.economic_indicators(provider='imf', symbol='IFS::NGDP_XDC', country='USA')","handlingStrategy":"validation","validationCode":"COUNTRY_DIMS = {'COUNTRY', 'REF_AREA', 'JURISDICTION', 'AREA'}\n\ndef has_country_source(country, dimension_values) -> bool:\n    if country:\n        return True\n    if not dimension_values:\n        return False\n    return any(str(d).split(':', 1)[0].strip().upper() in COUNTRY_DIMS for d in dimension_values)\n\nif not has_country_source(country, dimension_values):\n    raise ValueError(\"Provide country='USA' or dimension_values=['COUNTRY:USA'].\")","typeGuard":"COUNTRY_DIMS = {'COUNTRY', 'REF_AREA', 'JURISDICTION', 'AREA'}\n\ndef is_country_dimension_value(dv: str) -> bool:\n    return str(dv).split(':', 1)[0].strip().upper() in COUNTRY_DIMS","tryCatchPattern":null,"preventionTips":["Always pass country explicitly unless you deliberately encode it as a dimension value.","Use exact dimension IDs (COUNTRY, REF_AREA, JURISDICTION, AREA) — check the dataflow's structure when unsure."],"tags":["imf","openbb","validation","country-code","dimension-values","pydantic"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}