[BUG] New ScriptEditor GH Component (Python) Retains Input As Persistent

Wanted to bring this one to your attention.
Both the old IronPython (GhPython Component) and the new C# Scripting component update an empty input value properly, however Python3 and IronPython 2 versions of the scripting component do not work.

Example (disconnecting an input, TEST should be null):

Python Version:

a = x

C# Version:

private void RunScript(object x, out object a)
{
a = x;
}

Thanks for the help!

I think this one is for @eirannejad.

1 Like

Thanks @pierrec, I’ll edit and let Wim and John get out of here :smile:

Is this the same problem?

One of my new Python 3 components has ‘-’ internalised on the x input.

list_empty_python.gh (19.3 KB)

That’s even more odd. I would expect it to hold onto the 2 you disconnect not the previous -

@michaelvollrath Test this again if you don’t mind. I had a bug in C# component that would not pass the output to the output parameter.

Not sure how this happened. But the code inside the component seems to be passing - to output when x is not set. I’d appreicate if you can show me how I can replicate this issue

Not sure if this helps but when I first was attempting to utilize Sticky to store input values I realized that the Python3 (new script editor component) retained the last input it was given even when disconnected. I used this thinking it was a feature and was annoyed slightly to have to add logic to handle “if input is null, then x = None” kind of code.

Then as I learned more about Sticky I realized I could script that functionality and that the input stickyness of the new script editor was probably a bug.

Hi @eirannejad ,

Unfortunately it still seems to be happening, perhaps after today/tomorrows WIP build I should test again?

Connected Input:

Disconnected Input:

Code:

a = x

I see so IronPython maintains the value. Let me take a look at this.

Ok I see where the problem is. I’ll get it fixed but it’s not gonna make it to this week’s WIP if we publish one. Sorry for the bug. This was introduced after I made python scopes persistent.

1 Like

Thanks Eshan!

1 Like

Got it fixed before lunch so it might make it to the WIP today. I’ll test the build tomorrow and will keep you posted

2 Likes

Awesome thanks for the update!

1 Like