Output data tree from ghhops-server

Hi all,

I couldn’t find an example of returning data as tree from a python hops function, and I’m wondering how should this be done.
Tried returning a dictionary in the same format as three input looks like, but it didn’t work =(
Here is an example of what I tried:

@hops.component(
    "/curve_end_points",
    name="EndPoints",
    nickname="EndPoints",
    description="Get curve start/end points",
    icon="beamupUserObjects/icons/bmd_level.png",
    inputs=[
        hs.HopsCurve("Curve", "C", "Curve to evaluate")
    ],
    outputs=[
        hs.HopsPoint("S"),
        hs.HopsPoint("E"),
        hs.HopsNumber("EE", "EE", "test")
    ]
)
def end_points(curve: rc.Curve):
    start = curve.PointAt(0)
    end = curve.PointAt(1)
    return (end, start, {"{0}": end.X, "{1}": start.X})

And I’m getting this error in gh:
Solution exception:Input string was not in a correct format.

1 Like

Update:
I’ve realized there’s an open issue for this - Support output tree in ghhops-server · Issue #378 · mcneel/compute.rhino3d · GitHub
So :crossed_fingers: :crossed_fingers: :upside_down_face: