{"record":{"id":"62522e2105c6bb9c","repo":"OpenBB-finance/OpenBB","slug":"error-loading-extension-name-91m-e-0m","errorCode":null,"errorMessage":"Error loading extension: {name}\n\u001b[91m{e}\u001b[0m","messagePattern":"Error loading extension: (.+?)\n\u001b\\[91m(.+?)\u001b\\[0m","errorType":"exception","errorClass":"LoadingError","httpStatus":null,"severity":"error","filePath":"openbb_platform/core/openbb_core/app/router.py","lineNumber":531,"sourceCode":"\n\nclass RouterLoader:\n    \"\"\"Router Loader.\"\"\"\n\n    @staticmethod\n    @lru_cache\n    def from_extensions() -> Router:\n        \"\"\"Load routes from extensions.\"\"\"\n        router = Router()\n\n        for name, entry in ExtensionLoader().core_objects.items():  # type: ignore[attr-defined]\n            try:\n                router.include_router(router=entry, prefix=f\"/{name}\")\n            except Exception as e:\n                msg = f\"Error loading extension: {name}\\n\"\n                if Env().DEBUG_MODE:\n                    traceback.print_exception(type(e), e, e.__traceback__)\n                    raise LoadingError(msg + f\"\\033[91m{e}\\033[0m\") from e\n                warnings.warn(\n                    message=msg,\n                    category=OpenBBWarning,\n                )\n\n        return router\n","sourceCodeStart":513,"sourceCodeEnd":538,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/app/router.py#L513-L538","documentation":"Raised in the economic-indicators `atransform_data` when the query is in table mode (`_is_table` True) but `_dataflow` is falsy. `_dataflow` is set from the table symbol's prefix during model validation, so in practice this indicates inconsistent internal state — e.g. `_is_table` was set without going through `parse_and_validate_symbols`, or the attribute was mutated/reset afterward. Wrapped in OpenBBError, so it surfaces as a provider failure.","triggerScenarios":"Constructing ImfEconomicIndicatorsQueryParams and flipping `_is_table` manually without setting `_dataflow`; pickling/deep-copying a params object where private attrs were dropped; subclassing or monkey-patching that interferes with the model validator. Normal calls through the router cannot hit it because the validator always sets both together.","commonSituations":"Library-internal misuse rather than a bad API call; tests that construct the params object and hand-set private fields; framework reloads (e.g. pytest fixtures) dropping underscore-prefixed attributes.","solutions":["If you construct the params object yourself, set `_dataflow` (the part before '::') whenever you set `_is_table=True`.","Prefer going through the public router/endpoint so the model validator initializes private state correctly.","Re-create the params object from scratch instead of mutating private attributes."],"exampleFix":"# before (manual construction)\nq = ImfEconomicIndicatorsQueryParams(symbol='STA::H_CPI', country='USA')\nq._is_table = True  # _dataflow never set\n\n# after\nq = ImfEconomicIndicatorsQueryParams(symbol='STA::H_CPI', country='USA')  # validator sets both _is_table and _dataflow","handlingStrategy":"validation","validationCode":"def validate_table_state(query) -> None:\n    if getattr(query, '_is_table', False) and not getattr(query, '_dataflow', None):\n        raise ValueError('Table mode requires _dataflow; construct via ImfEconomicIndicatorsQueryParams so the model validator sets it.')\n\nvalidate_table_state(query)","typeGuard":"def is_consistent_table_query(query) -> bool:\n    is_table = getattr(query, '_is_table', False)\n    dataflow = getattr(query, '_dataflow', None)\n    return (is_table and bool(dataflow)) or (not is_table)","tryCatchPattern":null,"preventionTips":["Never hand-set _is_table on the params object — let parse_and_validate_symbols initialize private state.","In tests, construct params from a valid table symbol (e.g. STA::H_CPI) rather than mutating internals."],"tags":["imf","openbb","internal-state","table","symbol"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}