Python GHComponent bug: dynamic input update mismatch

Hello there!

I wonder if this is a bug, while using a grasshopper python I noticed that if we dynamically add some inputs to the component python in GH_Instance SDK Mode:

But if the RunScript() def as columned parameters (it might be convinient sometimes to use it) it doesn’t automatically update and throws an error 1. Error running script (ExecuteException): RunScript() takes 3 positional arguments but 4 were given:

Hence, if you are using lists as datatype input the IDE will organize automatically the RunScrip()'s parameters in column resaulting the above mentioned error, see here:

it happens since 8.8.24170.13001, before this behavior didn’t exist. I know we can live with it but I just reported it in case… thanks! :palms_up_together:

Is this a verified bug @eirannejad (sorry for poking you on this one :pray: ) ?
It’s actually quite incapacitating because one cannot assign List types to entries without the component to fail.

@andrea.settimi Would you mind giving me steps to replicate this? I made a python script and modified the RunScript signature and added a y of List[object] and it works.

Thanks!

Thanks for the reply and for taking the time :open_hands: !

I still got the same error. If you try to:

  • add a parameter in the component on your right by clicking while keeping the IDE opened
  • or adding a second list parameter?
    …does it complain?

In my case it does.

Oh I see!! I can replicate this. It happens when the RunScript signature becomes multiline!

I will get this fixed ASAP

RH-83124 Adding inputs on component fails when RunScript is multiline

1 Like