Error with img.binary

I’m getting the weirdest errors with the latest firmware (2.4) and binary filtering:

If I use “img.binary(0, 83, -128, 15, -128, 127)” it works.

But if I do this:

threshold = (0, 83, -128, 15, -128, 127)
img.binary(threshold)

I get the attached error:

Try

img.binary(*threshold)

Neither worked… The first just didn’t give an error.

It’s a list of tuples. So [(12, 1, 1, 1, 1, 12)].

Thanks guys. I ended up going with:

img.binary([thresholds[threshold_index]])

Looks weird, but seems to work!

I think this should work as well:

thresholds[index:index+1]