{"record":{"id":"0f1489264e237f93","repo":"OpenBB-finance/OpenBB","slug":"this-charting-method-does-not-support-provider-0f1489","errorCode":null,"errorMessage":"This charting method does not support {provider}. Supported providers: imf.","messagePattern":"This charting method does not support (.+?)\\. Supported providers: imf\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"openbb_platform/extensions/economy/openbb_economy/economy_views.py","lineNumber":528,"sourceCode":"                x=0,\n                font=dict(size=12),\n            ),\n        )\n        content = fig.to_plotly_json()\n\n        return fig, content  # type: ignore\n\n    @staticmethod\n    def economy_shipping_chokepoint_info(\n        **kwargs,\n    ) -> tuple[\"OpenBBFigure\", dict[str, Any]]:\n        \"\"\"Maritime Chokepoint Info Chart.\"\"\"\n        # pylint: disable=import-outside-toplevel\n\n        provider = kwargs.get(\"provider\")\n\n        if provider != \"imf\":\n            raise RuntimeError(\n                f\"This charting method does not support {provider}. Supported providers: imf.\"\n            )\n\n        try:\n            from openbb_imf.views.maritime_chokepoint_info import (\n                plot_chokepoint_annual_avg_vessels,\n            )\n        except Exception as e:\n            raise RuntimeError(\"Unable to import the required module.\") from e\n\n        theme = (\n            kwargs.get(\"extra_params\", {}).get(\"theme\")\n            or kwargs.get(\"theme\")\n            or getattr(kwargs[\"charting_settings\"], \"chart_style\", \"dark\")\n        )\n        data = (\n            kwargs.pop(\"data\", None)\n            if \"data\" in kwargs and kwargs[\"data\"] is not None","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/extensions/economy/openbb_economy/economy_views.py#L510-L546","documentation":"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.","triggerScenarios":"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.","commonSituations":"Fetching chokepoint data from an alternative provider then applying the default charting route, or writing a custom integration that bypasses the IMF fetcher.","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."],"exampleFix":"# before\nres = obb.economy.shipping.chokepoint_info(provider='custom').charting.to_chart()\n\n# after\nres = obb.economy.shipping.chokepoint_info(provider='imf')\nfig, content = res.charting.to_chart()","handlingStrategy":"validation","validationCode":"assert kwargs.get('provider', 'imf') == 'imf', (\n    'chokepoint chart requires provider=\"imf\"'\n)","typeGuard":null,"tryCatchPattern":"try:\n    fig, content = views.economy_shipping_chokepoint_info(**kwargs)\nexcept RuntimeError as e:\n    if 'does not support' in str(e) and 'imf' in str(e):\n        kwargs['provider'] = 'imf'  # refetch with imf, then retry\n    else:\n        raise","preventionTips":["Pin provider='imf' on shipping data requests feeding the chart.","Use generic charting for non-IMF shipping data."],"tags":["charting","imf","provider-mismatch","shipping"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}