From 636dfc1432fc27d30835767deef4f5884294b839 Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Fri, 6 Jan 2023 10:38:16 +0000 Subject: [PATCH] fix candle with av data --- openbb_terminal/forex/forex_helper.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openbb_terminal/forex/forex_helper.py b/openbb_terminal/forex/forex_helper.py index 68467e4c2eb3..6e8e13566685 100644 --- a/openbb_terminal/forex/forex_helper.py +++ b/openbb_terminal/forex/forex_helper.py @@ -258,7 +258,9 @@ def display_candle( External axes (1 axis is expected in the list), by default None """ # We check if there's Volume data to avoid errors and empty subplots - has_volume = bool(data["Volume"].sum() > 0) + has_volume = False + if "Volume" in data.columns: + has_volume = bool(data["Volume"].sum() > 0) if add_trend: if (data.index[1] - data.index[0]).total_seconds() >= 86400: