How to avoid input parameter failed to collect data warning?

I would like to simply default input value, user not wire anything, on Compiled component

In Rhino 7 it’s working fine without any warning information


Input_RH7.ghx (29.9 KB)

But in Rhino 8 there are always warning “input parameter failed to collect data”


Input_RH8.ghx (56.8 KB)

Would you please help how can I avoid this warning ?

Thank you very much

1 Like

If you output a to a panel, does it work as expected?

No it’s not even run

This component did not run because it lacked required data.
Two runtime warnings.

RH8_Error

On Iron Python components, the default value provided by the Grasshopper end for an unconnected input Param is None. So if you’re not passing in 0, '', [] or False in there, (or if one of them is the default) you can do x = x or default_value. Otherwise use e.g. x = default_value if x is None else x

Thank you very much for your reply
But I not really get your point
IMHO my code above is already coding as your suggested.
but the point is Complied Component on Rhino 8 is force warning message and will not run if all input are not fullfil.

i think in rhino 8 you are not using the standard python3/ironpython components.
they seem to come from a plugin called user.gh, which i don’t have. in anycase, if you use standard script components, everything works as expected

Thank you for your help.

Yes you are correct it’s just my simple python script.
Source are attatched under topic’s picture. Input_RH8.ghx and Input_RH7.ghx.

I use ScriptEditor in Rhino 8 for complie Input_RH8.ghx
and complie mene in Rhino 7 use PythonEditor in grasshopper component to complie.

Thank you very much