In short, make sure your python lines are "clean", cause some trailing symbols might not trigger syntax error, but results in the code doing things entirely different from your expectations:
>>> a = 2, >>> a (2,) vs >>> a = 2 >>> a 2
trailing ',' would define a tuple instead of the intended data type and trigger a type error down the line.
source: class - member variable string gets treated as Tuple in Python - Stack Overflow
be careful! or you'd get this too: