From a74439125fbb41ac651fa1d1748b362d97656d8d Mon Sep 17 00:00:00 2001 From: minhhoang1023 <40023817+minhhoang1023@users.noreply.github.com> Date: Thu, 13 Oct 2022 23:51:42 +0100 Subject: [PATCH] Fix wrong export path (#2621) Co-authored-by: Colin Delahunty <72827203+colin99d@users.noreply.github.com> Co-authored-by: hjoaquim --- .../parameters/params_controller.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py b/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py index e430a735075..da1ab414c8f 100644 --- a/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py +++ b/openbb_terminal/portfolio/portfolio_optimization/parameters/params_controller.py @@ -254,9 +254,6 @@ class ParametersController(BaseController): filepath = os.path.abspath( os.path.join( os.path.dirname(__file__), - ".", - "portfolio", - "optimization", ns_parser.file, ) ) @@ -403,12 +400,13 @@ class ParametersController(BaseController): f"between {minimum} and {maximum} in steps of " f"{maximum / sum(x > 0 for x in AVAILABLE_OPTIONS[argument])}" ) + + console.print( + f"[red]The value {value} is not an option for {argument}.\n" + f"The value needs to be {options}[/red]" + ) + else: self.params[argument] = str(AVAILABLE_OPTIONS[argument]) # type: ignore - console.print( - f"[red]The value {value} is not an option for {argument}.\n" - f"The value needs to be within: {options}.[/red]" - ) - console.print()