Problem with new Python editor

Dear @AndersDeleuran I’m using one of your scripts to populate value lists but I failed to convert it and make it work in the new Python 3 editor.

The first place where it fails is type(obj) which I for now replaced with str(obj.GetType())

Can you please take a look?

I’m not on my laptop, but try running the code in IronPython instead of CPython first.

There seems to be a problem too

I wonder if it’s the new .NET framework. Does the GHPython component work?

The only thing that currently works is the old python component.

The IronPython does not seem to like my type hints and I needed to change the type hint for the keys to integer. The script works but I’d prefer the key type to be a two digit number same as the value and my child layer names.

value_list.gh (20.6 KB)

I don’t have access to Rhino 8, but the second error looks like it might be related to the first bug reported here:

That is, the Keys input parameter is not passed as a Python list, but a .NET List[str] in the new editor.

1 Like