From eb024b7dc3c9b0110ce4eeca04fdfb919b2addcc Mon Sep 17 00:00:00 2001 From: Mainak Kundu <94432368+mkundu1@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:50:05 -0400 Subject: [PATCH] fix: unitless parameter for pyconsole (#3428) * fix: Handle unitless parameters * fix: Handle unitless parameters * fix: pyconsole --- src/ansys/fluent/core/solver/flobject.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ansys/fluent/core/solver/flobject.py b/src/ansys/fluent/core/solver/flobject.py index 674339f3251..8f3f89accfb 100644 --- a/src/ansys/fluent/core/solver/flobject.py +++ b/src/ansys/fluent/core/solver/flobject.py @@ -1757,8 +1757,11 @@ def _fix_parameter_list_return(val): for name, v in val.items(): value, units = v if len(units) > 0 and isinstance(units[0], str): + # Symbols are not stripped in the command return in PyConsole. + # Following code will work in both PyConsole and PyFluent. + unit = units[0].lstrip("'") unit_labels = _fix_parameter_list_return.scheme_eval( - f"(units/inquire-available-label-strings-for-quantity '{units[0]})" + f"(units/inquire-available-label-strings-for-quantity '{unit})" ) unit_label = unit_labels[0] if len(unit_labels) > 0 else "" else: