diff --git a/openbb_terminal/core/plots/plotly_ta/data_classes.py b/openbb_terminal/core/plots/plotly_ta/data_classes.py index 6ec596d5ff8..b86a461cfc5 100644 --- a/openbb_terminal/core/plots/plotly_ta/data_classes.py +++ b/openbb_terminal/core/plots/plotly_ta/data_classes.py @@ -55,7 +55,7 @@ class TAIndicator: output = opt return output - def get_argument_values(self, label: str) -> List[Any]: + def get_argument_values(self, label: str) -> Union[List[Any], Any]: """Returns arguments values by label""" output = [] options = self.get_args(label) diff --git a/openbb_terminal/core/plots/plotly_ta/plugins/custom_indicators_plugin.py b/openbb_terminal/core/plots/plotly_ta/plugins/custom_indicators_plugin.py index 1ed75dd29e4..c32fb7921c1 100644 --- a/openbb_terminal/core/plots/plotly_ta/plugins/custom_indicators_plugin.py +++ b/openbb_terminal/core/plots/plotly_ta/plugins/custom_indicators_plugin.py @@ -20,7 +20,8 @@ class Custom(PltTA): @indicator() def plot_srlines(self, fig: OpenBBFigure, df_ta: pd.DataFrame): """Adds support and resistance lines to plotly figure""" - window = self.params["srlines"].get_argument_values("window") or 200 + window = self.params["srlines"].get_argument_values("window") + window = window[0] if isinstance(window, list) and len(window) > 0 else 200 def is_far_from_level(value, levels, df_stock): ave = np.mean(df_stock["High"] - df_stock["Low"]) diff --git a/website/controller_doc_classes.py b/website/controller_doc_classes.py index 355897ad7ff..8cb225a3c27 100644 --- a/website/controller_doc_classes.py +++ b/website/controller_doc_classes.py @@ -14,7 +14,7 @@ import pandas as pd from pandas.tseries.holiday import USFederalHolidayCalendar import openbb_terminal -from openbb_terminal.base_helpers import load_dotenv_and_reload_configs +import openbb_terminal.config_terminal as cfg # noqa: F401 from openbb_terminal.core.plots.backend import plots_backend from openbb_terminal.decorators import disable_check_api from openbb_terminal.helper_funcs import ( @@ -28,7 +28,7 @@ from openbb_terminal.rich_config import console from openbb_terminal.sdk import openbb from openbb_terminal.stocks.comparison_analysis import finviz_compare_model -load_dotenv_and_reload_configs() +cfg.start_required_configurations() disable_check_api() plots_backend().start() plots_backend().isatty = True