Why TypeError: 'str' object is not callable?
Randall Parker
techiepundit at futurepundit.com
Wed Mar 22 15:10:49 EST 2006
Using Python 2.4.2 on Windows 2000 in SPE.
Getting:
TypeError: 'str' object is not callable
on this line:
TmpErrMsg1 = "State machine %s " (StateMachineName)
In Winpdb 1.0.6 the StateMachineName is of type str in the Namespace |
Local window of local variables. It even has the string value I expect
of 'ExampleAO'. That string variable was originally set in another
variable by reading a socket packet field. Then it was assigned to
StateMachineName.
I'm not using str as a variable. I searched all my source code.
So why can't I do this?
Is there a way to test what "str" is? Maybe importing the minidom
messed up what str is? This code used to work. I am trying to figure
out what caused it to cease to work.
Any ideas?
More information about the Python-list
mailing list