OpenBB-finance/OpenBB · error · NotImplementedError

pywry is not installed

Error message

pywry is not installed

What it means

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.

Source

Thrown at openbb_platform/obbject_extensions/charting/openbb_charting/core/dummy_backend.py:14

"""Dummy backend when pywry is not installed."""

from typing import Any


class DummyBackend:
    """No-op backend used when pywry is not installed."""

    def __init__(self, **kwargs):
        self.theme: Any = kwargs.get("theme")

    def show_plotly(self, **kwargs):
        """Raise NotImplementedError."""
        raise NotImplementedError("pywry is not installed")

    def show_dataframe(self, **kwargs):
        """Raise NotImplementedError."""
        raise NotImplementedError("pywry is not installed")

    def show(self, content="", **kwargs):
        """Raise NotImplementedError."""
        raise NotImplementedError("pywry is not installed")

    def emit(self, *args, **kwargs):
        """No-op."""

    def close(self, **kwargs):
        """No-op."""

    def destroy(self):
        """No-op."""

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Install the display dependency: pip install openbb-pywry (the OpenBB-maintained pywry fork that backend.py imports).
  2. Verify the import resolves in the same interpreter OpenBB uses: python -c "from pywry import PlotlyConfig; print('ok')".
  3. 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().
  4. Reinstall the charting extension with its extras: pip install openbb-charting[all] or rebuild the OpenBB python env (python -m openbb.

Example fix

// before
obbject.charting.show()  # NotImplementedError: pywry is not installed

// after (shell)
pip install openbb-pywry

// after (code: bypass native window)
figure = obbject.charting.charting.to_chart(data)  # OpenBBFigure
figure.show(external=True)  # or use plotly's fig.to_plotly_json() in your own renderer
Defensive patterns

Strategy: validation

Validate before calling

try:
    import pywry  # noqa: F401
    PYWRY_AVAILABLE = True
except ImportError:
    PYWRY_AVAILABLE = False

if not PYWRY_AVAILABLE:
    print("pywry missing - native charts disabled; pip install openbb-pywry")

Type guard

def has_pywry() -> bool:
    try:
        from pywry import PlotlyConfig  # noqa: F401
        return True
    except ImportError:
        return False

Try / catch

try:
    fig.show()
except NotImplementedError as e:
    if "pywry" in str(e):
        fig.show(external=True)  # browser fallback
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14). Data as JSON: /api/errors/5176b58e5b74a9dd. Report an issue: GitHub.