Interval is not callable

Hi everyone,

I’m getting a rather bizarre error in one of my GHPython components where the range() function isn’t working as expected. For some reason it seems to think the integer is an interval inside the range() command, but not when it’s outside the range() command:


This is extra strange/annoying as it only does this for the second iteration of the for loop it is in. During the first loop (where the types are identical) it works as expected.

I’ve attached the isolated GHPython component below if anyone can help out.


Interval (8.7 KB)

On line 51 you are assigning an Interval to the variable range. Pick a different name for the variable, as it shadows the function name range.

1 Like

Ofcourse! Serves me right for sloppy variable naming - lesson learnt!

1 Like