diff --git a/taipy/gui/builder/_utils.py b/taipy/gui/builder/_utils.py index ad55ec510c..5ce4b898d3 100644 --- a/taipy/gui/builder/_utils.py +++ b/taipy/gui/builder/_utils.py @@ -39,10 +39,11 @@ def visit_Name(self, node): if var_parts[0] in self.non_vars: return node value = _get_value_in_frame(self.frame, var_parts[0]) - if callable(value): - return node if len(var_parts) > 1: value = attrgetter(var_parts[1])(value) + if not isinstance(value, (str, int, float, bool, list, tuple)): + # transform into constants only what can be (ie not callable or generator for example) + return node return ast.Constant(value=value, kind=None)