OpenBB-finance/OpenBB · error · RuntimeError
This charting method does not support {provider}. Supported
Error message
This charting method does not support {provider}. Supported providers: imf. What it means
The maritime chokepoint info chart (economy_shipping_chokepoint_info) is provider-specific: it delegates rendering to openbb_imf.views.maritime_chokepoint_info, which only understands IMF-SDB response shapes. If the provider attached to the data is not 'imf', it raises RuntimeError immediately instead of attempting to plot foreign data.
Source
Thrown at openbb_platform/extensions/economy/openbb_economy/economy_views.py:528
x=0,
font=dict(size=12),
),
)
content = fig.to_plotly_json()
return fig, content # type: ignore
@staticmethod
def economy_shipping_chokepoint_info(
**kwargs,
) -> tuple["OpenBBFigure", dict[str, Any]]:
"""Maritime Chokepoint Info Chart."""
# pylint: disable=import-outside-toplevel
provider = kwargs.get("provider")
if provider != "imf":
raise RuntimeError(
f"This charting method does not support {provider}. Supported providers: imf."
)
try:
from openbb_imf.views.maritime_chokepoint_info import (
plot_chokepoint_annual_avg_vessels,
)
except Exception as e:
raise RuntimeError("Unable to import the required module.") from e
theme = (
kwargs.get("extra_params", {}).get("theme")
or kwargs.get("theme")
or getattr(kwargs["charting_settings"], "chart_style", "dark")
)
data = (
kwargs.pop("data", None)
if "data" in kwargs and kwargs["data"] is not NoneView on GitHub (pinned to 3e071fcc2c)
Solutions
- Request the data with provider='imf': obb.economy.shipping.chokepoint_info(provider='imf').
- For other providers, extract the results (res.to_df()) and build the figure with the generic charting API.
Example fix
# before res = obb.economy.shipping.chokepoint_info(provider='custom').charting.to_chart() # after res = obb.economy.shipping.chokepoint_info(provider='imf') fig, content = res.charting.to_chart()
Defensive patterns
Strategy: validation
Validate before calling
assert kwargs.get('provider', 'imf') == 'imf', (
'chokepoint chart requires provider="imf"'
) Try / catch
try:
fig, content = views.economy_shipping_chokepoint_info(**kwargs)
except RuntimeError as e:
if 'does not support' in str(e) and 'imf' in str(e):
kwargs['provider'] = 'imf' # refetch with imf, then retry
else:
raise Prevention
- Pin provider='imf' on shipping data requests feeding the chart.
- Use generic charting for non-IMF shipping data.
When it happens
Trigger: Calling obb.economy.shipping.chokepoint_info(...).charting.to_chart() (or the view directly) with a non-IMF provider, or with provider unset/None while injecting external data.
Common situations: Fetching chokepoint data from an alternative provider then applying the default charting route, or writing a custom integration that bypasses the IMF fetcher.
Related errors
- This charting method does not support {provider}. Supported
- This charting method does not support {provider}. Supported
- Unable to import the required module.
- Could not import Charting modules. Install with `pip install
- Invalid data format. Expected a list of ImfMaritimeChokePoin
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/0f1489264e237f93.
Report an issue: GitHub.