{"record":{"id":"a1203e2e6f231b17","repo":"OpenBB-finance/OpenBB","slug":"failed-to-build-the-openbb-platform-static-assets","errorCode":null,"errorMessage":"Failed to build the OpenBB platform static assets. \n{e} -> {e.__traceback__.tb_frame.f_code.co_filename}:{e.__traceback__.tb_lineno}","messagePattern":"Failed to build the OpenBB platform static assets\\. \n(.+?) -> (.+?):(.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"critical","filePath":"openbb_platform/core/openbb_core/build.py","lineNumber":63,"sourceCode":"                stderr=result.stderr,\n            )\n\n    except (ModuleNotFoundError, subprocess.CalledProcessError) as exc:\n        logger.info(\n            \"The OpenBB build package\"\n            \"may have been uninstalled or corrupted. \"\n            \"Try `pip uninstall openbb` and reinstalling `openbb-core` in the environment.\\n\"\n        )\n        raise exc from None\n\n    if not building_found:\n        logger.info(\"Did not build on import, triggering rebuild...\\n\")\n        try:\n            import openbb  # noqa\n\n            openbb.build()\n        except Exception as e:  # pylint: disable=broad-except\n            raise RuntimeError(  # noqa\n                \"Failed to build the OpenBB platform static assets. \\n\"\n                f\"{e} -> {e.__traceback__.tb_frame.f_code.co_filename}:\"  # type:ignore  # pylint: disable=E1101\n                f\"{e.__traceback__.tb_lineno}\"  # type:ignore\n                if hasattr(e, \"__traceback__\")\n                and hasattr(e.__traceback__, \"tb_frame\")  # type:ignore\n                and hasattr(\n                    e.__traceback__.tb_frame,  # type:ignore\n                    \"f_code\",\n                )\n                and hasattr(\n                    e.__traceback__.tb_frame.f_code,  # type:ignore  # pylint: disable=E1101\n                    \"co_filename\",\n                )\n                and hasattr(\n                    e.__traceback__,  # type:ignore\n                    \"tb_lineno\",\n                )\n                else f\"Failed to build the OpenBB platform static assets. \\n{e}\"","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/core/openbb_core/build.py#L45-L81","documentation":"RuntimeError from openbb_core/build.py: on first import, if no pre-built static assets were found, OpenBB triggers openbb.build() and this wrapper converts any build failure into a RuntimeError that embeds the underlying exception message plus the file:line of its raise site. It tells you the auto-generated command tree could not be created.","triggerScenarios":"Importing openbb (import openbb as obb) in a fresh environment where the static package was never built and the build fails - e.g. a provider extension errors during build, a broken entry point, permissions on the assets directory, or a corrupted install after partial uninstall.","commonSituations":"Broken/partial uninstall-reinstall cycles (openbb uninstalled but openbb-core cache left behind); installing a provider package with import errors; read-only or non-writable site-packages (containers, locked-down environments); version incompatibility between extensions and openbb-core after upgrades.","solutions":["Do a clean reinstall: pip uninstall openbb openbb-core -y && pip install openbb","Read the embedded '{e} -> file:line' to find which module failed; uninstall or upgrade that extension","Run python -m openbb_core.build --debug (or set OPENBB_DEBUG_MODE=true) manually to see the full build traceback","Verify write permissions for site-packages/openbb in containerized environments"],"exampleFix":"# before\npip install openbb  # then 'import openbb' fails at build step\n\n# after\npip uninstall -y openbb openbb-core openbb-providers...\npip install openbb\nOPENBB_DEBUG_MODE=true python -m openbb_core.build  # inspect if it fails again","handlingStrategy":"try-catch","validationCode":"import importlib.util\n\ndef openbb_importable() -> bool:\n    return importlib.util.find_spec('openbb') is not None and importlib.util.find_spec('openbb_core') is not None","typeGuard":null,"tryCatchPattern":"try:\n    import openbb as obb\nexcept RuntimeError as e:\n    if 'Failed to build' in str(e):\n        raise SystemExit(\n            'OpenBB static assets failed to build - run: '\n            'pip uninstall -y openbb openbb-core && pip install openbb'\n        ) from e\n    raise","preventionTips":["Pin openbb and extension versions in requirements to avoid incompatible sets","Verify installs in CI with 'python -c \"import openbb\"' before running suites","Avoid partial uninstalls; clean site-packages/openbb leftovers when reinstalling"],"tags":["openbb","build","installation","startup"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}