Skip to content

Commit

Permalink
Merge pull request #406 from Avaiga/bug/#405-wrong-variable-name
Browse files Browse the repository at this point in the history
#405 user variable name vs var_name
  • Loading branch information
FredLL-Avaiga authored Sep 10, 2022
2 parents ee47bc3 + 419100e commit 0d872fc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/taipy/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d872fc

Please sign in to comment.