{"record":{"id":"143663d0a3cb8d5f","repo":"OpenBB-finance/OpenBB","slug":"error-processing-indicator-indicator-name-e","errorCode":null,"errorMessage":"Error processing indicator {indicator.name}: {e}","messagePattern":"Error processing indicator (.+?): (.+?)","errorType":"exception","errorClass":"TA_DataException","httpStatus":null,"severity":"error","filePath":"openbb_platform/obbject_extensions/charting/openbb_charting/core/plotly_ta/data_classes.py","lineNumber":386,"sourceCode":"\n        output = self.df_ta\n        for indicator in active_indicators:\n            if (\n                indicator.name in self.columns\n                and \"volume\" in self.columns[indicator.name]\n                and not self.has_volume\n            ):\n                continue\n            if indicator.name in [\"fib\", \"srlines\", \"clenow\", \"demark\", \"ichimoku\"]:\n                continue\n            try:\n                indicator_data = self.get_indicator_data(\n                    indicator,\n                    **self.indicators.get_options_dict(indicator.name) or {},\n                )\n            except Exception as e:\n                indicator_data = None\n                raise TA_DataException(\n                    f\"Error processing indicator {indicator.name}: {e}\"\n                ) from e\n\n            if indicator_data is not None:\n                output = output.join(indicator_data).infer_objects()\n                numeric_cols = output.select_dtypes(include=[\"number\"]).columns\n                output[numeric_cols] = output[numeric_cols].interpolate(\"linear\")\n\n        return output\n","sourceCodeStart":368,"sourceCodeEnd":396,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/obbject_extensions/charting/openbb_charting/core/plotly_ta/data_classes.py#L368-L396","documentation":"In PlotlyTA.get_indicator_output-ish aggregation (data_classes.py:386), each indicator's data is produced by self.get_indicator_data(...); any exception it raises is wrapped into TA_DataException(f\"Error processing indicator {indicator.name}: {e}\") with the original chained. The inner error is usually a missing input column (high/low/volume) for that specific indicator, NaN-laden data, or a pandas_ta computation failure.","triggerScenarios":"Requesting an indicator whose required columns are absent — e.g. 'obv'/'ad' without a volume column, 'atr' without high/low — or indicator option dicts from ChartIndicators containing invalid values for pandas_ta.","commonSituations":"Charting index or economic data (close-only series) with a default indicator set that assumes OHLCV; sparse frames where rolling windows produce all-NaN; stale indicator option names after a pandas_ta upgrade.","solutions":["Inspect the __cause__ of the TA_DataException — it names the indicator and the underlying failure.","Ensure the frame has the columns the indicator needs (high, low, close, volume) or drop that indicator from the request.","Clean NaNs / ensure enough rows for the indicator's lookback window.","Catch TA_DataException per run and fall back to a reduced indicator set so one bad indicator doesn't kill the chart."],"exampleFix":"# before\nindicators = {\"obv\": {}, \"sma\": {\"length\": 20}}  # fails on close-only data\nfig = obbject.charting.to_chart(data=df, indicators=indicators)\n\n# after\nindicators = {\"sma\": {\"length\": 20}}  # drop volume-dependent obv\nfig = obbject.charting.to_chart(data=df, indicators=indicators)","handlingStrategy":"try-catch","validationCode":"required = {\"obv\": [\"close\", \"volume\"], \"atr\": [\"high\", \"low\", \"close\"], \"adx\": [\"high\", \"low\", \"close\"]}\nhave = set(map(str.lower, df.columns))\nindicators = {k: v for k, v in indicators.items() if set(required.get(k, [\"close\"])) <= have}","typeGuard":"def indicator_supported(cols: set[str], name: str) -> bool:\n    needs = {\"obv\": {\"close\", \"volume\"}, \"ad\": {\"high\", \"low\", \"close\", \"volume\"}}.get(name, {\"close\"})\n    return needs <= cols","tryCatchPattern":"from openbb_charting.core.plotly_ta.data_classes import TA_DataException\ntry:\n    output = ta.get_base_data()  # or full aggregation\nexcept TA_DataException as e:\n    logger.warning(\"indicator failed (%s), cause=%s\", e, e.__cause__)\n    indicators.pop(bad_name, None)  # retry with reduced set","preventionTips":["Match requested indicators to the columns your frame actually has.","Read e.__cause__ — it carries the pandas/KeyError root cause.","Ensure enough rows for the longest lookback window.","Treat TA_DataException per-indicator: drop the indicator, keep the chart."],"tags":["python","openbb","charting","technical-analysis","exception-wrapping"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}