{"record":{"id":"0b7d91290a67c293","repo":"OpenBB-finance/OpenBB","slug":"no-data-available-table-indicator-codes-do-not-ma","errorCode":null,"errorMessage":"No data available: Table indicator codes do not match available data for dimension '{dim_id}'. Table has indicators: {codes}but given {prior_selections}, available indicators are: {available_values}","messagePattern":"No data available: Table indicator codes do not match available data for dimension '(.+?)'\\. Table has indicators: (.+?)but given (.+?), available indicators are: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/imf/openbb_imf/utils/table_builder.py","lineNumber":646,"sourceCode":"                                if len(constraint_key) > MAX_CODES_LENGTH:\n                                    constraint_key = \"*\"\n                        else:\n                            constraint_key = joined_codes\n\n                        builder_key = user_override if user_override else constraint_key\n                        builder.set_dimension((dim_id, builder_key))\n                    else:\n                        # No codes available for this dimension given prior constraints\n                        # This means the table's indicators don't exist for this country/period\n                        empty_dimensions.append(dim_id)\n                        # Build context for error message\n                        prior_selections = {\n                            d: normalized_kwargs.get(d)\n                            for d in dims_in_order\n                            if d in normalized_kwargs\n                            and dims_in_order.index(d) < dims_in_order.index(dim_id)\n                        }\n                        raise ValueError(\n                            f\"No data available: Table indicator codes do not match \"\n                            f\"available data for dimension '{dim_id}'. \"\n                            f\"Table has indicators: {codes}\"\n                            f\"but given {prior_selections}, \"\n                            f\"available indicators are: {available_values}\"\n                        )\n\n            # If ALL indicator dimensions had zero matches, the hierarchy doesn't apply\n            indicator_dims_set = {\"INDICATOR\", \"BOP_ACCOUNTING_ENTRY\", \"SERIES\", \"ITEM\"}\n            missing_indicator_dims = [\n                d for d in empty_dimensions if d in indicator_dims_set\n            ]\n            expected_indicator_dims = [\n                d for d in dims_in_order if d in indicator_dims_set\n            ]\n            unmapped_indicator_dims = [\n                d\n                for d in expected_indicator_dims","sourceCodeStart":628,"sourceCodeEnd":664,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/imf/openbb_imf/utils/table_builder.py#L628-L664","documentation":"Raised when the table's indicator codes are valid in principle, but after applying the user's prior constraints (country, counterpart area, etc.) the intersection with actually-available data for the indicator dimension is empty. The builder explicitly names the table's indicators versus what is actually available so the user can see the mismatch.","triggerScenarios":"Querying a table whose indicator dimension has codes, but for which the builder, after progressive constraint filtering against a specific country/period, finds zero matching codes - e.g. a BOP table queried for a country that only reports a different accounting series. Raised in the elif branch handling dimensions with hierarchy codes.","commonSituations":"Small economies or non-reporting countries missing certain series; querying composite/Net indicators where only Credit/Debit exist; combining a country with an indicator family that nation does not report; stale hierarchy metadata claiming codes that no longer exist.","solutions":["Drop or change the prior constraint (usually COUNTRY) to one that reports the indicators listed in the message.","Switch to one of the 'available indicators' the error enumerates instead of the table's default set.","Request the parent/wider hierarchy (use '*' for the dimension) and post-filter locally.","If availability looks wrong, refresh metadata caches - the availability snapshot may be stale."],"exampleFix":"# before\nres = obb.economy.imf.fetch(dataset='BOP', parameters={'COUNTRY': 'TOT', 'BOP_ACCOUNTING_ENTRY': 'N'})\n# after - use an accounting entry the country actually reports (per the error's list)\nres = obb.economy.imf.fetch(dataset='BOP', parameters={'COUNTRY': 'TOT', 'BOP_ACCOUNTING_ENTRY': 'C'})","handlingStrategy":"validation","validationCode":"# Probe availability for the country before the full fetch\nprobe = obb.economy.imf.fetch(dataset='BOP', parameters={'COUNTRY': country, 'INDICATOR': '*'}, limit=1)\nif not probe.results:\n    skip(country)  # this country/table combo has no matching indicators","typeGuard":null,"tryCatchPattern":"try:\n    res = obb.economy.imf.fetch(...)\nexcept ValueError as e:\n    if 'Table indicator codes do not match available data' in str(e):\n        continue  # expected for non-reporting countries in batch loops\n    raise","preventionTips":["For country loops, probe with '*' and limit=1 before the full request","Maintain a per-country capability map from prior fetches","Treat this as expected empty-data, not a bug, in batch pipelines"],"tags":["imf","no-data","constraint-filtering","valueerror"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}