From 419100ef38007140ea1416346d5a46a459264143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fred=20Lef=C3=A9v=C3=A8re-Laoide?= <90181748+FredLL-Avaiga@users.noreply.github.com> Date: Sat, 10 Sep 2022 14:49:36 +0200 Subject: [PATCH] #405 user variable name vs var_name --- src/taipy/gui/gui.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/taipy/gui/gui.py b/src/taipy/gui/gui.py index 9310aca0a9..778f2f8e5f 100644 --- a/src/taipy/gui/gui.py +++ b/src/taipy/gui/gui.py @@ -650,16 +650,17 @@ def __request_data_update(self, var_name: str, payload: t.Any) -> None: if isinstance(lib_name, str): lib = self.__extensions.get(lib_name) if isinstance(lib, ElementLibrary): + user_var_name = var_name try: try: - var_name = self.__get_real_var_name(var_name)[0] + user_var_name = self.__get_real_var_name(var_name)[0] except NameError: # ignore name error and keep var_name pass - ret_payload = lib.get_data(lib_name, payload, var_name, newvalue) + ret_payload = lib.get_data(lib_name, payload, user_var_name, newvalue) except Exception as e: warnings.warn( - f"Exception raised in '{lib_name}.get_data({lib_name}, payload, {var_name}, value)':\n{e}" + f"Exception raised in '{lib_name}.get_data({lib_name}, payload, {user_var_name}, value)':\n{e}" ) if not isinstance(ret_payload, dict): ret_payload = self._accessors._get_data(self, var_name, newvalue, payload)