Using Network components Heteroptera in HOPS

Hi @stevebaer,

I am trying to use the network components from Heteroptera in Hops. When doing so I get the folowing errors:

  1. Object reference not set to an instance of an object.: component “” (0114415b-8aac-4a98-9808-c9875e7fc09b)
  2. Solution exception:Object reference not set to an instance of an object.: component “Network From Lines” (2449bb99-5ae1-433d-a32f-41d2874fab65)
    I have contacted Amin Bahrami from Hetroptera. Het checked the script and he managed to run the script on his computer without any problems. Why is it not running on my computer.

Heteroptera_test_checked.7z (17.7 KB)

When I have a look at the guids in the script using metahopper I find different object references then those which are mentioned by the HOPS warnings.

Did he check running the definition by using hops?

Hi @stevebaer

Yes. This was his answer:

Hi Erik

Are you using the latest version on heteroptera? Perhaps it may be because of the mismatching the index of parameters in different version of Heteroptera. unlikely to be but still a unpredicted case,

It work smoothly on my computer with Hops

so its essential to ensure that you use a same version of plug-in everywhere. However I doubt that I changed this component recently which cause the problem .



I just tested on an other computer in the office but it was still not running and throwing out the same type of error. I also installed the latest version of Heteroptera.

Compare thr plugins and Rhino version for the computer that does work and the one that doesn’t in your office. Any differences?

Hi @stevebaer,

On my computer I have Rhino version 7SR11(7.11.21293.9001,2021-10-20) and Heteroptera
I do not know with which version Amin managed to make it work.

In the mean time I ran the script without hiding the console. This produced the folowing error message:

ERR] An exception occurred while processing request
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary2.get_Item(TKey key) at Heteroptera.GraphNet.P2C(Dictionary2 p)
at Heteroptera.GraphNet.P2C(IEnumerable1 p) at Heteroptera.GraphNet.set_Topology(List1 value)
at Heteroptera.GraphNet…ctor(GH_Structure`1 pt)
at Heteroptera.NetworkRegion.SolveInstance(IGH_DataAccess DA)
at Grasshopper.Kernel.GH_Component.Solution_Compute_MixedAccess(GH_StructureIterator it)
[09:13:22 ERR] Solution exception:The given key was not present in the dictionary.: component “Region (Perceptive)” (baed3358-fe87-4bab-baa0-c92ea82700de)
::1 - [2021-11-02T09:13:22.0949076+01:00] “POST /grasshopper HTTP/1.1” 500 -
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[1]
Executed endpoint ‘/grasshopper HTTP: POST’
info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
Request finished HTTP/1.1 POST http://localhost:6500/grasshopper application/json;+charset=utf-8 1148 - 500 - - 30.3560ms
info: rhino.compute.ReverseProxyModule[0]
Max concurrent requests = 4
info: rhino.compute.ReverseProxyModule[0]

Did you send that callstack to the developer? It definitely looks useful in tracking down where things are going sideways

Yes, but just yesterday. I do not have an answer yet.