{"record":{"id":"ff441f43892a210a","repo":"OpenBB-finance/OpenBB","slug":"could-not-find-the-route-adjusted-route-in-the","errorCode":null,"errorMessage":"Could not find the route `{adjusted_route}` in the charting functions.","messagePattern":"Could not find the route `(.+?)` in the charting functions\\.","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"openbb_platform/obbject_extensions/charting/openbb_charting/charting.py","lineNumber":121,"sourceCode":"            functions.extend(get_charting_functions_list(view))\n\n        return functions\n\n    def _get_functions(self) -> dict[str, Callable]:\n        \"\"\"Return a dict with the available functions.\"\"\"\n        functions: dict[str, Callable] = {}\n        for view in self._extension_views:\n            functions.update(get_charting_functions(view))\n\n        return functions\n\n    def _get_chart_function(self, route: str) -> Callable:\n        \"\"\"Given a route, it returns the chart function. The module must contain the given route.\"\"\"\n        if route is None:\n            raise ValueError(\"OBBject was initialized with no function route.\")\n        adjusted_route = route.replace(\"/\", \"_\")[1:]\n        if adjusted_route not in self._functions:\n            raise ValueError(\n                f\"Could not find the route `{adjusted_route}` in the charting functions.\"\n            )\n        return self._functions[adjusted_route]\n\n    def get_params(self) -> Union[\"ChartParams\", None]:\n        \"\"\"Return the ChartQueryParams class for the function the OBBject was created from.\n\n        Without assigning to a variable, it will print the docstring to the console.\n        If the class is not defined, the help for the function will be returned.\n        \"\"\"\n        # pylint: disable=import-outside-toplevel\n        from openbb_charting.query_params import ChartParams\n\n        if self._obbject._route is None:  # pylint: disable=protected-access\n            raise ValueError(\"OBBject was initialized with no function route.\")\n        charting_function = (\n            self._obbject._route  # pylint: disable=protected-access\n        ).replace(\"/\", \"_\")[1:]","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/obbject_extensions/charting/openbb_charting/charting.py#L103-L139","documentation":"After stripping the leading slash and replacing '/' with '_', the adjusted route name (e.g. 'equity_price_historical') is not a key in the charting extension's function registry. This means the fetched data's router path has no charting view registered - either the route belongs to an endpoint with no chart function or the needed charting extension/view is not installed.","triggerScenarios":"Calling .charting() on an OBBject from an endpoint without a charting view (e.g. some news or macro routes); a custom provider extension whose router lacks a matching charting function; an installed-but-outdated openbb_charting that misses newer routes.","commonSituations":"New API routes used with an older charting extension; third-party extension endpoints expected to auto-chart; misspelled custom route names in manual OBBject metadata.","solutions":["Update openbb charting packages: pip install -U openbb-charting openbb (or the relevant extension)","Check whether a charting view exists for the route: print(list(obj.charting._functions.keys()))","For routes without views, build a chart manually: obj.charting.to_chart(data=obj.to_df())"],"exampleFix":"# before\nres = obb.news.world(query='nvidia')\nres.charting()  # no view registered\n\n# after\nres.charting.to_chart(data=res.to_df())","handlingStrategy":"validation","validationCode":"adjusted = obj._route.replace('/', '_')[1:]\navailable = obj.charting._functions\nif adjusted not in available:\n    raise KeyError(f'no chart view for {adjusted}; available: {sorted(available)[:20]}')","typeGuard":"def route_has_chart(obj) -> bool:\n    adjusted = getattr(obj, '_route', '').replace('/', '_')[1:]\n    return adjusted in obj.charting._functions","tryCatchPattern":"try:\n    res.charting()\nexcept ValueError as e:\n    if 'Could not find the route' in str(e):\n        res.charting.to_chart(data=res.to_df())","preventionTips":["Keep openbb-charting and extensions updated together","Check charting._functions keys when adding custom providers","Fall back to generic to_chart for uncovered routes"],"tags":["openbb","charting","route-lookup","extension-missing"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}