Python Script "object cannot be interpreted as an index" when inputting formula

python
unhandled

(A Pollock24) #1

Hi

I am trying to input a formula in the python script box and it says “object cannot be interpreted as an index”. I have ran this in a python notebook and it seems to work fine. Does anyone know what I am doing wrong?

Sorry - I am pretty new at Python (and gh!) and google/forums arn’t giving me an answer!

Cheers
Andrew
Analysis.gh (8.4 KB)


#2

Hi @a.pollock24,

right click on the word spn of your Analysis component and set the type hint to float. Do this for all other inputs and it works.

_
c.


(A Pollock24) #3

Ah great. Thanks for the help!