{"record":{"id":"5176b58e5b74a9dd","repo":"OpenBB-finance/OpenBB","slug":"pywry-is-not-installed","errorCode":null,"errorMessage":"pywry is not installed","messagePattern":"pywry is not installed","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"openbb_platform/obbject_extensions/charting/openbb_charting/core/dummy_backend.py","lineNumber":14,"sourceCode":"\"\"\"Dummy backend when pywry is not installed.\"\"\"\n\nfrom typing import Any\n\n\nclass DummyBackend:\n    \"\"\"No-op backend used when pywry is not installed.\"\"\"\n\n    def __init__(self, **kwargs):\n        self.theme: Any = kwargs.get(\"theme\")\n\n    def show_plotly(self, **kwargs):\n        \"\"\"Raise NotImplementedError.\"\"\"\n        raise NotImplementedError(\"pywry is not installed\")\n\n    def show_dataframe(self, **kwargs):\n        \"\"\"Raise NotImplementedError.\"\"\"\n        raise NotImplementedError(\"pywry is not installed\")\n\n    def show(self, content=\"\", **kwargs):\n        \"\"\"Raise NotImplementedError.\"\"\"\n        raise NotImplementedError(\"pywry is not installed\")\n\n    def emit(self, *args, **kwargs):\n        \"\"\"No-op.\"\"\"\n\n    def close(self, **kwargs):\n        \"\"\"No-op.\"\"\"\n\n    def destroy(self):\n        \"\"\"No-op.\"\"\"\n","sourceCodeStart":1,"sourceCodeEnd":32,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/obbject_extensions/charting/openbb_charting/core/dummy_backend.py#L1-L32","documentation":"Raised by DummyBackend.show_plotly, the no-op stand-in that core/backend.py:53 installs when the `import pywry` at backend.py:36 fails. The charting extension is installed but its native display engine (pywry, the OpenBB PyWry fork) is missing, so any attempt to render a Plotly figure in the native window raises NotImplementedError instead of drawing. The chart data itself is fine; only the display backend is absent.","triggerScenarios":"Calling obbject.charting.show(), figure.show(external=False), or any code path that reaches Backend.show_plotly (e.g. the `chart=True` output of a router command being rendered) when `python -c \"import pywry\"` fails.","commonSituations":"Installing openbb-charting via a method that skips the pywry extra (e.g. `pip install openbb-charting --no-deps` or a trimmed requirements file), running in a headless CI container where pywry's build failed silently, or a venv created before pywry was added to the extension's dependencies.","solutions":["Install the display dependency: pip install openbb-pywry (the OpenBB-maintained pywry fork that backend.py imports).","Verify the import resolves in the same interpreter OpenBB uses: python -c \"from pywry import PlotlyConfig; print('ok')\".","If you never need the native window, render the figure through Plotly instead: use the object returned by `to_chart`/charting commands with fig.show() from plotly directly, or export with fig.to_plotly_json().","Reinstall the charting extension with its extras: pip install openbb-charting[all] or rebuild the OpenBB python env (python -m openbb."],"exampleFix":"// before\nobbject.charting.show()  # NotImplementedError: pywry is not installed\n\n// after (shell)\npip install openbb-pywry\n\n// after (code: bypass native window)\nfigure = obbject.charting.charting.to_chart(data)  # OpenBBFigure\nfigure.show(external=True)  # or use plotly's fig.to_plotly_json() in your own renderer","handlingStrategy":"validation","validationCode":"try:\n    import pywry  # noqa: F401\n    PYWRY_AVAILABLE = True\nexcept ImportError:\n    PYWRY_AVAILABLE = False\n\nif not PYWRY_AVAILABLE:\n    print(\"pywry missing - native charts disabled; pip install openbb-pywry\")","typeGuard":"def has_pywry() -> bool:\n    try:\n        from pywry import PlotlyConfig  # noqa: F401\n        return True\n    except ImportError:\n        return False","tryCatchPattern":"try:\n    fig.show()\nexcept NotImplementedError as e:\n    if \"pywry\" in str(e):\n        fig.show(external=True)  # browser fallback\n    else:\n        raise","preventionTips":["Install charting with its extras: pip install openbb-charting[all] or install openbb-pywry explicitly.","Verify display deps in the same venv OpenBB runs from: python -c \"import pywry\".","In headless/CI environments, always render with external=True or export fig.to_plotly_json() instead of the native window."],"tags":["python","openbb","charting","dependency","runtime"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}