MultiThreadedRendezvous Error in Pymechanical

CollinsJnr
CollinsJnr Member Posts: 4
Name Dropper First Comment
edited January 30 in Structures

I am using Pymechanical and I keep getting this error

_MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.RESOURCE_EXHAUSTED details = "to-be-sent trailing metadata size exceeds peer limit" debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"to-be-sent trailing metadata size exceeds peer limit", grpc_status:8, created_time:"2024-01-30T14:31:15.8037186+00:00"}" >

My Code
nodes = mechanical.run_python_script("""
import json
mesh_data = ExtAPI.DataModel.Project.Model.Analyses[0].MeshData
output_faceMesh = mesh_data.MeshRegionById(26) #26 is the Id of the surface
input_faceMesh = mesh_data.MeshRegionById(28) #28 is the Id of the surface
output_nodes = output_faceMesh.NodeIds
input_nodes = input_faceMesh.NodeIds
nodes = {'output_nodes' : output_nodes,
'input_nodes' : input_nodes
}
json.dumps(nodes)
""")

I suspect this is data transfer limit problem in the gRPC framework in Pymechanical.
Particularly because I am dumping json which is larger in size compared to the protocol buffers.

If this is the case, is there a better way to extract the data?
If not, what then is the problem?

Thank you in advance

Answers

  • CollinsJnr
    CollinsJnr Member Posts: 4
    Name Dropper First Comment

    For anyone who has this problem in the future.
    The best way to dump large amounts of data from mechanical to Python through Pymechanical is to convert your data to strings or text.

    Strings and texts have very small data sizes, so you don't exceed the meta data limit.
    Cheers