You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ReinforcementLayout: output shows <empty> on error instead of an empty tree #33
When DDU_CSC_ReinforcementLayout stops early or fails, its Evidence output shows <empty> instead of carrying no data. In grasshopper_userobjects_src/DDU_CSC_ReinforcementLayout.py:
RunScript starts with Evidence = '' and returns it from every error path, so an empty string goes out as one item.
empty_outputs() (used when the library is missing or the outputs were just updated) returns None for a single output.
Downstream components such as AddEvidence then receive an item that is not a record.
Expected
By the convention of the CSC Grasshopper components, an output without a result is an empty Grasshopper tree: no branch items, neither an empty string nor null. The Add components already do this, e.g. DDU_CSC_AddEvidence.py initialises Stored = Grasshopper.DataTree[System.Object]() and returns it on every early exit.
Initialise Evidence as Grasshopper.DataTree[System.Object]() and return it on every path without a record (missing input, error, _stop()).
On success, put the record JSON into that tree (or return the string, if a single item is what the convention expects for a successful run; keep it the same as the other Create / build components).
empty_outputs() returns an empty tree for each output, so the early stop also gives no data.
Done when
Every error path and the early stop leave the Evidence output with no data (no <empty>, no <null>).
A successful run gives the record JSON as before.
A test in tests/grasshopper checks that the error and early-stop paths return an empty tree.
Check whether other build components (ApplyFrame, the Create components) return '' or None the same way, and name them in the PR.
The re-exported user object (.ghuser and its XML) follows with the next Grasshopper release.
Related: the issue on missing inputs as warnings (#32); both touch the same RunScript.
Activity
fix(gh): missing inputs warn, no result is an empty tree or a null sl…
fstwn commentedon Nov 4, 2026
Fixed in 0.6.4.4 (#53).