Hi there,
I have integrated hops (the main script with hops elements, as well as nested hops) into the gh model. I also have a kind of remote server with Rhino.Compute. The calculation on a remote server from a locally running Grasshopper is positive.
Rhino.Compute logs:
CG [08:27:23 DBG] Using cached definition
[08:27:23 INF] HTTP POST /io responded 200 in 75.8728 ms
[08:27:23 INF] Max concurrent requests = 1
CG [08:27:24 DBG] Using cached definition
[08:27:24 INF] HTTP POST /io responded 200 in 5.1727 ms
CG [08:27:24 DBG] Using cached definition
[08:27:24 INF] HTTP POST /io responded 200 in 3.9008 ms
[08:27:26 INF] HTTP POST /io responded 200 in 464.3671 ms
[08:27:27 INF] HTTP POST /io responded 200 in 397.8919 ms
CG [08:27:28 DBG] Using cached definition
[08:27:28 INF] HTTP POST /io responded 200 in 3.3694 ms
[08:27:30 INF] HTTP POST /io responded 200 in 527.9378 ms
[08:27:31 INF] HTTP POST /io responded 200 in 771.8101 ms
[08:27:32 INF] HTTP POST /io responded 200 in 604.9685 ms
[08:27:33 INF] HTTP POST /io responded 200 in 740.9338 ms
[08:27:34 INF] HTTP POST /io responded 200 in 750.5256 ms
[08:27:35 INF] HTTP POST /io responded 200 in 735.1951 ms
[08:27:36 INF] HTTP POST /io responded 200 in 394.8211 ms
CG [08:27:37 DBG] Using cached definition
[08:27:37 INF] HTTP POST /io responded 200 in 4.2134 ms
[08:27:38 INF] HTTP GET / responded 200 in 1.9452 ms
[08:27:38 INF] HTTP POST /io responded 200 in 761.9471 ms
CG [08:27:39 DBG] Using cached definition
CG [08:27:39 DBG] Skipping input tree... same input
...............................
[08:27:39 INF] HTTP POST /grasshopper responded 200 in 6.5939 ms
[08:27:39 INF] HTTP POST /grasshopper responded 200 in 1.9483 ms
[08:27:39 INF] HTTP POST /grasshopper responded 200 in 2.7543 ms
CG [08:27:39 DBG] Using cached definition
[08:27:40 INF] HTTP POST /grasshopper responded 200 in 432.5039 ms
CG [08:27:41 DBG] Using cached definition
[08:27:41 INF] HTTP POST /grasshopper responded 200 in 864.5040 ms
CG [08:27:42 DBG] Using cached definition
[08:27:42 INF] HTTP POST /grasshopper responded 200 in 554.4727 ms
CG [08:27:43 DBG] Using cached definition
CG [08:27:43 DBG] Skipping input tree... same input
.................................................
[08:27:43 INF] HTTP POST /grasshopper responded 200 in 202.4363 ms
CG [08:27:44 DBG] Using cached definition
[08:27:44 INF] HTTP POST /grasshopper responded 200 in 489.9061 ms
CG [08:27:45 DBG] Using cached definition
CG [08:27:45 DBG] Skipping input tree... same input
...............................................
[08:27:45 INF] HTTP POST /grasshopper responded 200 in 221.8771 ms
But when I try to call the calculation of the main gh model from the code, an empty geometry comes up. And part of the log on Rhino.Compute looks like this:
CG [08:29:11 DBG] Floating parameter failed to collect data: component "Relay" (9107f948-0ea1-4387-9cb8-1228ae16d719)
CG [08:29:11 DBG] Floating parameter failed to collect data: component "Panel" (c21c07d1-fabe-4407-8d4b-4b41fdc4023c)
CG [08:29:11 DBG] Input parameter DoorFrame failed to collect data: component "Context Bake" (f5f4a5f8-1a57-47ef-a9fb-e1911d70be6f)
CG [08:29:11 DBG] Input parameter Window failed to collect data: component "Context Bake" (fca3c9b0-e3c2-4cf2-9acb-f0cbeb196759)
CG [08:29:11 DBG] Input parameter M failed to collect data: component "Mesh Colours" (3a4382ff-7dc3-403f-b7c4-a8634fba98eb)
CG [08:29:11 DBG] Input parameter Storve failed to collect data: component "Context Bake" (13d13346-90ce-45cc-b9b9-5146e63ff062)
[08:29:11 INF] HTTP POST /grasshopper responded 200 in 13821.2390 ms
Code for calling calculations. I tried both through pointer and through file decoding::
async with aiohttp.ClientSession() as session:
async with session.post(url=post_url, data=json.dumps({
"algo": str(encoded, 'utf-8'),
# "algo": None,
"pointer": None,
# "pointer": "https://my-server/api/v2606/hops_main",
"dataversion": 8,
"values": construct_values(compute_data),
# "values": [],
}), headers=headers) as response:
Response:
"modelunits":"Millimeters",
"dataversion":7,
"algo":"",
"pointer":"md5_7A21008E20C4DB9170D113A09A680501",
"cachesolve":false,
"values":[{
"ParamName":"Room",
"InnerTree":{
"{0}":[]
}
},
{
"ParamName":"Floor",
"InnerTree":{}
},
{"ParamName":"StorveProtect","InnerTree":{}}
it’s as if nested hops are not involved in the calculations.
In general, is such an algorithm for working with hops, nested hops possible?