OpenBB-finance/OpenBB · error · TA_DataException
Error processing indicator {indicator.name}: {e}
Error message
Error processing indicator {indicator.name}: {e} What it means
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.
Source
Thrown at openbb_platform/obbject_extensions/charting/openbb_charting/core/plotly_ta/data_classes.py:386
output = self.df_ta
for indicator in active_indicators:
if (
indicator.name in self.columns
and "volume" in self.columns[indicator.name]
and not self.has_volume
):
continue
if indicator.name in ["fib", "srlines", "clenow", "demark", "ichimoku"]:
continue
try:
indicator_data = self.get_indicator_data(
indicator,
**self.indicators.get_options_dict(indicator.name) or {},
)
except Exception as e:
indicator_data = None
raise TA_DataException(
f"Error processing indicator {indicator.name}: {e}"
) from e
if indicator_data is not None:
output = output.join(indicator_data).infer_objects()
numeric_cols = output.select_dtypes(include=["number"]).columns
output[numeric_cols] = output[numeric_cols].interpolate("linear")
return output
View on GitHub (pinned to 3e071fcc2c)
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.
Example fix
# before
indicators = {"obv": {}, "sma": {"length": 20}} # fails on close-only data
fig = obbject.charting.to_chart(data=df, indicators=indicators)
# after
indicators = {"sma": {"length": 20}} # drop volume-dependent obv
fig = obbject.charting.to_chart(data=df, indicators=indicators) Defensive patterns
Strategy: try-catch
Validate before calling
required = {"obv": ["close", "volume"], "atr": ["high", "low", "close"], "adx": ["high", "low", "close"]}
have = set(map(str.lower, df.columns))
indicators = {k: v for k, v in indicators.items() if set(required.get(k, ["close"])) <= have} Type guard
def indicator_supported(cols: set[str], name: str) -> bool:
needs = {"obv": {"close", "volume"}, "ad": {"high", "low", "close", "volume"}}.get(name, {"close"})
return needs <= cols Try / catch
from openbb_charting.core.plotly_ta.data_classes import TA_DataException
try:
output = ta.get_base_data() # or full aggregation
except TA_DataException as e:
logger.warning("indicator failed (%s), cause=%s", e, e.__cause__)
indicators.pop(bad_name, None) # retry with reduced set Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No close column found in dataframe
- Unknown indicator: {indicator}
- Please make sure that the columns 'High', 'Low', and 'Close
- Failed to convert results to chart. Ensure the provided data
- Please provide data with only one symbol and columns for OHL
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/143663d0a3cb8d5f.
Report an issue: GitHub.