{"record":{"id":"737990c1a3357cf4","repo":"OpenBB-finance/OpenBB","slug":"this-charting-method-does-not-support-provider","errorCode":null,"errorMessage":"This charting method does not support {provider}. Supported providers: fred.","messagePattern":"This charting method does not support (.+?)\\. Supported providers: fred\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"openbb_platform/extensions/economy/openbb_economy/economy_views.py","lineNumber":48,"sourceCode":"        from openbb_charting.styles.colors import LARGE_CYCLER\n        from openbb_core.app.utils import basemodel_to_df\n        from pandas import DataFrame\n\n        ytitle_dict = {\n            \"chg\": \"Change\",\n            \"ch1\": \"Change From Year Ago\",\n            \"pch\": \"Percent Change\",\n            \"pc1\": \"Percent Change From Year Ago\",\n            \"pca\": \"Compounded Annual Rate Of Change\",\n            \"cch\": \"Continuously Compounded Rate Of Change\",\n            \"cca\": \"Continuously Compounded Annual Rate Of Change\",\n            \"log\": \"Natural Log\",\n        }\n\n        provider = kwargs.get(\"provider\")\n\n        if provider != \"fred\":\n            raise RuntimeError(\n                f\"This charting method does not support {provider}. Supported providers: fred.\"\n            )\n\n        columns = basemodel_to_df(kwargs[\"obbject_item\"], index=None).columns.to_list()  # type: ignore\n\n        allow_unsafe = kwargs.get(\"allow_unsafe\", False)\n        dropnan = kwargs.get(\"dropna\", True)\n        normalize = kwargs.get(\"normalize\", False)\n\n        data_cols = []\n        data = kwargs.get(\"data\")\n\n        if isinstance(data, DataFrame) and not data.empty:\n            data_cols = data.columns.to_list()\n            df_ta = data\n\n        else:\n            df_ta = basemodel_to_df(kwargs[\"obbject_item\"], index=\"date\")  # type: ignore","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/extensions/economy/openbb_economy/economy_views.py#L30-L66","documentation":"The FRED dataset charting view (economy_views.py) is hard-wired to FRED data shapes, so it refuses any provider other than 'fred'. kwargs carries the provider used for the data request; if it is anything else (or None with injected data), the view raises RuntimeError immediately rather than producing a malformed multi-series chart.","triggerScenarios":"Calling obb.economy.chart.fred() (or to_chart on a FRED-style dataset) after fetching data with provider='yfinance'/'oecd'/'fmp'; supplying external data= without going through a FRED request.","commonSituations":"Copy-pasting a charting snippet from another provider's docs, charting a user-provided DataFrame via the FRED chart method, or a provider default resolving to something other than fred.","solutions":["Fetch the series with provider='fred' before invoking this chart: obb.economy.fred.series(symbol, provider='fred').charting(...).","For non-FRED time series, use the generic chart endpoints (obb.economy.chart or to_chart on the OBBject) instead of the FRED-specific view.","If injecting your own DataFrame, accept that this method is FRED-only and pick the generic line chart."],"exampleFix":"# before\nres = obb.economy.fred.series('T10YIE', provider='oecd').charting.to_chart()  # wrong chart route\n\n# after\nres = obb.economy.fred.series('T10YIE', provider='fred').charting.fred()","handlingStrategy":"validation","validationCode":"assert kwargs.get('provider', 'fred') == 'fred', (\n    'fred chart requires provider=\"fred\"'\n)","typeGuard":null,"tryCatchPattern":"try:\n    fig = res.charting.fred()\nexcept RuntimeError as e:\n    if 'does not support' in str(e) and 'fred' in str(e):\n        fig = res.charting.to_chart()  # generic fallback\n    else:\n        raise","preventionTips":["Match chart method to the provider used on the data request.","Default to the generic to_chart() for cross-provider workflows.","Keep provider explicit (not inherited from a previous call) in scripts."],"tags":["charting","fred","provider-mismatch","economy"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}