
Re: Help with script error
Hmmm... I'm not sure what is going on here exactly. The error message:
TypeError: 'VariableCmds' object is unindexable
would occur if you tried to reference an index on the variable command space instead of the variable object model dict.
indigo.variable is the command space that should be used for commands such as
updateVariable, whereas the object model
indigo.variables is the dict that contains all of the variable objects. So if you tried:
- Code: Select all
indigo.variable[967341429]
I would expect the error you saw since the correct syntax is actually:
- Code: Select all
indigo.variables[967341429]
All that said, your script code does look correct so I'm not sure what is going wrong. Is the problem consistently reproducible?
Could it be that you have another version of the script being run by a different schedule that has the error?