Input Trees breaking in Rhino Compute

Hi there Forum Peeps!

I am running into a weird issue with my python application, making use of VIKTOR - I have a rhino compute server running on AWS that I am making calls to, but I think maybe the actual data I am sending back to the server is incorrect.

I get a 500 response from the server, but it contains only some of the data that I need from my analysis:

{
    "modelunits": "Millimeters",
    "dataversion": 7,
    "algo": "",
    "pointer": "md5_3CAEF92A04CC2EC92BB697A4B1078ECA",
    "cachesolve": false,
    "values": [
        {
            "ParamName": "previewBC",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "previewthermalmodel",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "Step2_out_HBmodel",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "Step2_out_wallmesh",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "Step2_out_window",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "Step2_out_roofmesh",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "Step2_out_allcontextmesh",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "Step2_out_simplifiedcontexmesh",
            "InnerTree": {}
        },
        {
            "ParamName": "Step2_out_glazingBrep",
            "InnerTree": {
                "{0}": [
                    {
                        "type": "Rhino.Geometry.Brep",
                        "data": "Multiple Brep Data Redacted so the post isnt 4 pages long"
                    }
                ]
            }
        },
        {
            "ParamName": "Step2b_out_HBmodel",
            "InnerTree": {}
        },
        {
            "ParamName": "WWRmodelPreview",
            "InnerTree": {}
        },
        {
            "ParamName": "GlazingmodelPreview",
            "InnerTree": {}
        },
        {
            "ParamName": "GlazingMeshForAnalysis",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "WallMeshForAnalysis",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "RoofMeshForAnalysis",
            "InnerTree": {
                "{0}": []
            }
        },
        {
            "ParamName": "SelectedThermalModelPreview",
            "InnerTree": {
                "{0;0}": []
            }
        }
    ],
    "errors": [
        "Solution exception:Aperture cannot be added to Face \"01_Void_01_4_4c0ccdf5..Face3\" with a Adiabatic boundary condition.: component \"HB Add Subface\" (d1b00cf9-700c-4961-8c5b-09d7ba4bdb45): component \"Hops\" (0477a1cc-c241-4bfd-8ca5-8cb1c967ca35)"
    ]
}

I also note the error I am getting with the Honeybee Add Subface component, but considering I am getting Glazing data back from the server, it’s weird that it would be causing an issue.

Uploaded are two json files - the first one (upload_output) is the response I get back from the server after running the first analysis, the second is the request I am sending to the server (my input trees) - I note that in the input trees there is not type accompanying the data, but as far as I am aware this should not be causing an issue. I am also using data from the previous analysis in the next analysis.

Thanks guys, much appreciated!
upload_output.json (1.1 MB)
args_output.json (1.0 MB)

Just some extra information about how I am creating the input trees:

For the time being (I know it’s not great practice but will fix once it’s working) I am accessing the data from previous calculations like this:

# Accessing the stored data in VIKTOR and reading it into json, which works fine and has all of the data I need for this step.

storage = Storage()
current_upload = storage.get('uploaded_design', scope='entity')

# Read content from the file
with current_upload.open() as f:
    data = f.read()

json_data = json.loads(data)

Example where I need data with multiple items, in this case strings:

roomnames = []
for roomname in json_data["values"][1]["InnerTree"]['{0}']:
    data = roomname["data"]
    roomnames.append(data)

step2_roomnames_tree = gh.DataTree("Step2Roomnames")
step2_roomnames_tree.Append([{0}], roomnames)
input_trees.append(step2_roomnames_tree)

Example where I need data with multiple items, in this case geometry:

roombreps = []
for roompreb in json_data["values"][3]["InnerTree"]['{0}']:
    data = roompreb["data"]
    roombreps.append(data)

step2_roombreps_tree = gh.DataTree("Step2Rooms")
step2_roombreps_tree.Append([{0}], roombreps)
input_trees.append(step2_roombreps_tree)

I have uploaded the json I am getting back (uploaded_design) in the previous post.
I suspect that the issue might be flattening / grafting in my grasshopper scripts, but after a bit of trial and error I couldn’t get it to produce different output.