After replicating your script I’m not encountering the same issue…
Next steps to help me troubleshoot:
Are the self.view.custom.additionalInfo.thresholds.low/high properties bound to other values?
Where exactly are you seeing this error message? Designer console? Browser console? Gateway logs?
First note: It looks like the script is attempting to operate on two different types of objects (a “float” and a “com.google.gson.internal.LazilyParsedNumber”). That com.google.gson.internal.LazilyParsedNumber should be digested into a usable value by the time it reaches you script.
Second note: “actual” and “target” are bound to properties, not tags. Even if the view.custom.actual and view.custom.target properties are bound to tags, I’m still not able to replicate the issue.
Third note: It’s very odd that there is no operand declared in the error message you’ve supplied - I would have expected < or >= or *… Could you double-check the error message and make sure there isn’t a character omitted from what you’ve posted?
1. Are the self.view.custom.additionalInfo.thresholds.low/high properties bound to other values?
No, they are constant values. 2. Where exactly are you seeing this error message? Designer console? Browser console? Gateway logs?
In the gateway logs.
I could try t replicate this error with the latest nightly build.
While I don’t know that it’s necessary, you could also try wrapping your comparisons in parentheses to rule out a syntax error in the first elif: a < b < c:should be okay, but (a < b) and (b < c): is definitely okay. A syntax error of this type could explain the “:” from your error message…
That error occurs because an operand used in a mathematical equation is of type lazilyparsednumber and not a normal numeric type. I can’t tell what line it is occurring from the error you provided and couldn’t reproduce on my machine. That said, judging by the fact that your binding preview is returning a value from inside the try block and not from the except block, how sure are you that the error is being caused by this script?
Basically, if you find out what variable is the lazilyparsednumber (lets say self.view.custom.additionalInfo.thresholds.low) and you want to get the float value out of it, you can use the floatValue() method like so: self.view.custom.additionalInfo.thresholds.low.floatValue()