This script is being handled by a tag change event on my gateway, and the script is not entering my for loop, which loops through each row in a query response.
What is your pausedArea value in your script console? I think that must be your culprit. You have it correct in your script console but your str(event.tagPath)[1:4] is not correct in your tag event I would guess. Log pausedArea see if it matches what you’re feeding as pausedArea in your script console.
@Mitchell - a tip:
Post code rather than images and use the </> formatting button to preserve formatting and indents. That we can can copy and paste it into our answers rather than have to copy it from an image and type it out again.
In case anyone else stumbles upon this thread in the future
ROOT ISSUE: event.getTagPath() did not return the raw tag path as a string like I thought it did, so the line pausedArea = str(event.getTagPath)[1:4] was not returning what I needed it to.
SOLUTION:
I changed pausedArea = str(event.getTagPath)[1:4] to pausedArea = str(event.getTagPath().getParentPath())[1:4], as the event.getTagPath().getParentPath() returns the raw tag path for the tag that changed.
No, your real problem was missing parentheses. You were converting the method object to a string, not the result of the method. "bou" was part of the word "bound", for a bound method.
Jython automatically turns Java methods like getX and setX into properties (.x), if they properly conform to the JavaBean “specification”. So asking for x.tagPath is calling getTagPath() for you, basically.