GHPython bug - messed GUIDs?


Does anyone encountered strange behaviour of GHPython component that after disconnecting and reconnecting one of the inputs and/or if the tree structure of such input changes it starts to have problems with GUIDs like Error: Runtime error (ValueErrorException): Could not convert 255327f4-3bbd-4b2a-8a18-b4390abb89ae to a Point3d. The code works perfectly before change of the inputs and even after getting back to exact same data as before it’s not recovering and still throwing such errors.

It’s hard to isolate the issue since the whole GH patch is quite complex and also referring 3dm file, but from this behaviour I infer that’s not an issue with the patch itself but rather something more universal regarding how GHPython handles the GUIDs maybe ?

I’ve tried clearing and recomputing solution, restarting Rhino etc. and it seems with some combination of such actions it eventually could recover, but it seems quite indeterministic.

Any help with narrowing down the issue / workarounds etc would be much appreciated !

Running the latest version (7.8.21181.05002, 2021-06-30 ) under Mac OS.


update - seems like deleting the script contents and pasting it again sometimes clear the issue (mind you, nothing is changing in the patch itself)

additional context info - two of the inputs are coming from Kangaroo (I’m aware that Kangaroo messes with incoming data structure, but haven’t heard of issues with the output)

here is the code in the GHPython node - maybe someone spot a suspicious part…

"""Provides a scripting component.
        x: The x script variable
        y: The y script variable
        a: The a output variable"""

__author__ = "jkozniewski"

import rhinoscriptsyntax as rs
import ghpythonlib.treehelpers as th
import Rhino
import copy

_ptA = th.tree_to_list(ptA,0)
_ptB = th.tree_to_list(ptB,0)
_lA = th.tree_to_list(lA,0)
_lB = th.tree_to_list(lB,0)

_linesA = copy.deepcopy(_lA)
_linesB = copy.deepcopy(_lB)

connectionsA = []
connectionsB = []

for index_A, linesIdListA in enumerate(_lA):
    for iA, liA in enumerate(linesIdListA):
        for index_B, linesIdListB in enumerate(_lB):
            for iB, liB in enumerate(linesIdListB):
                if( liA == liB ):
                    _linesA[index_A][iA] = rs.AddLine( _ptA[index_A][iA], _ptB[index_B][iB] )
                    _linesB[index_B][iB] = rs.AddLine( _ptB[index_B][iB], _ptA[index_A][iA] )
                    connectionsA.append( "{}.{} -> {}.{}".format( idA[index_A], iA, idB[index_B], iB) )
                    connectionsB.append( "{}.{} -> {}.{}".format( idB[index_B], iB, idA[index_A], iA) )


linesA = th.list_to_tree(_linesA)
linesB = th.list_to_tree(_linesB)

I had this same problem, and also using tree helper, so that could be the culprit.
Either way though, all I did was save my Rhino file, and my GUIDs were handled as expected.
Hopefully this helps anyone else coming across this weird niche problem.