Warning in python script

Hello everybody,

I’m working on a Dynamoscript with a custom node from steamnodes. I made the script a little while ago and back then it seems to be working fine.

I tried to run the script agian today and now it fails. It says: TypeError: expected GroupType, got List[object]. See the pictures below.

Thanks in advance

It seems like your input ‘grp’ is still a list even though there is only a single item in that list. You could try typing grp[0] in the second for loop. This will get the item at index zero from the list.

You could test to see if input IN[0] has a list length. If it does then return the first item. I think this way will work also.

Thanks for the responds but how do i write this in python? i’m not that familiar with python.


You can try to take the value “out of” the list in dynamo first:

Ok, I forgot to flatten the list. After i flatten the list it only selected the group like Einars script shows.
Now i got a different python warning. See the picture below.

What does this mean?


That’s weird, I have a similar script with similar lines of code for placing groups and that one works just fine. I think there’s still something wrong with your input, but I can’t see what it is like this. Maybe you could share your script or show exactly what you are inputting into the python script.

I just fixed it a minute ago! Mest the python up a bit and just reset it after i flatten the list. Now it works fine! thanks anyways.