"no viable alternative at input'*tag*'" error

I am trying to change the position and size of an object from a tag. The code works with a hardcoded value, or if I link it to a parameter, but when I try to link it to a tag I get a “no viable alternative at input” error. I don’t understand why this error is occurring. I have also tried to use the script in a main window instead of the template incase it was a scope issue, but the same error occurs.

What am I doing wrong?

You are trying to use a bare tagpath in a jython script. You must use a system.tag.read*() function to go get the tag value, where the tagpath is supplied as a string.