Issue with specklepy and grasshopper interchange ("units":none objects appear)

Hi all,

I am experiencing some issues in a workflow combining a stream updated from grasshopper and specklepy.

Context: We are utilizing a Speckle stream as some sort of database for our project, storing geometry with analysis results in key-value pairs. These analysis results are sourced from various scripts and platforms (some from Grasshopper, others from Python).

The workflow (refer to Image 2) operates as follows: to add new or updated analysis results, the update function initially retrieves the latest commit from Speckle. It then merges new data or updates existing key-value pairs, subsequently pushing the updated objects (including geometry, etc.) as a new commit back to Speckle.

Issue: However, we’ve encountered problems (see Image 1): when committing from Specklepy, an unexpected new Speckle object (“units”:None) appears, which then alters the hierarchy in Grasshopper. Moreover, each geometry object unexpectedly acquires a new attribute (“units”:None).

When this modified stream is pushed back to Speckle via Grasshopper, it can no longer be received in Python. We’ve found a temporary workaround, which involves always removing the “units”:None attribute from the geometry objects.

Is there a way to stopp this behaviour to appear? im also thankful for tipps for a more clever way of using speckle for our purpose!

2 Likes

Hey @Joscha_During , great first question. Welcome to the Community.

That said, I have been able to reproduce the units prop being added on receive-and-resend from Python and GH.

GH -> Python (add property) -> GH (add property) -> Python # Receives without error

The units are being added as they are a first-class property in the Base object definition in specklepy, but as I said, I don’t experience errors receiving objects with empty units in Python.

Can you confirm the server, GH connector, and specklepy versions from me?


Happy to continue digging into this with you, not least as I am super interested to learn more about what you are cooking up over there :smiley: