compas.rpc.RPCServerError: This function is not part of the API

Hi,

This query is concerning compas.rpc.Proxy

I created a class using trimesh library and I want to call this class I created through a proxy.
I referred to the syntax and added the python location of my file’s environment.

The get the error message
compas.rpc.RPCServerError: This function is not part of the API: subtract

Not entire sure if my file has been identified and why the function is not callable.

Please find attached the class I want to call through proxy

the proxy indeed does not work that way. but it is my fault for not documenting it better. will try to get that done this week. in the meantime, a few remarks that might help…

  1. the package parameter needs to be the name of a package on the PYTHONPATH from where the function you want to “proxy” can be imported. for example compas.numerical for fd_numpy.

  2. the python parameter is there to indicate whether you want to use python or pythonw. other than that the Proxy will always be executed by the Python of the environment that is active when you run the script. i admit that the name of this parameter could have been chosen better. just leave it on the default value.

  3. you can’t send custom class instances over RPC, yet. the data sent needs to be in the form of native Python objects.

Thank you for clarifying

Further I would like to get your suggestion on alternate ways to solve the issue.

The reason I tried to call the class by proxy is because the class I used from the trimesh library is not JSON serializable. I understand now that it has to be a native python object.

The primary interest is to perform a boolean operation. Are there other compatible
libraries you recommend?

Note: I use windows and do not have access to Docker

just to make sure: is the reason you are trying to use a proxy because you want to use this in Rhino/GH? otherwise you can use whatever lib you want without needing a proxy…

and to answer you question about the boolean operations: i would use PyMesh

Yes, the purpose is to use it in Rhino.

Thank you for your suggestion.