unable to launch spececlaim or discovery remote session using pygeometry for geometry file higher file size #2187
-
Hello, when I try to launch i am getting below error, is there any solution for the same ? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Indrajeetrt! Thanks for opening this discussion. Starting on 25R2, files can be streamed to the Discovery instance (preventing this problem you are seeing). However, I can see from your code that you are using 25R1. See pyansys-geometry/src/ansys/geometry/core/modeler.py Lines 450 to 451 in 24eeafa You are also mentioning that you are using the remote capabilities. However, if Discovery is in the same machine where your Python script is running, you can let Discovery know that it can take the file from the file system (avoiding the upload and thus the error). You would just need to specify it like this: geom = modeler.open_file(file_name, upload_to_server=False) However, once again, since you have it set to A last solution I can propose is to change the maximum message size for the gRPC communication. This is the workaround we have on versions earlier to 25R2, but it can come with potential failures since you will be trying to upload a single file with a single message (which is not recommended due to performance issues on gRPC). But it might unblock you in the meantime until you can upgrade to 25R2. So, the solution would be to do the following before any other piece of code: import ansys.geometry.core.connection.defaults as pygeom_defaults
pygeom_defaults.MAX_MESSAGE_LENGTH = 1024 * 1024**2 # 1024MB max message size
...
modeler = launch_modeler_with_discovery(hidden=True, product_version=251)
geom = modeler.open_file(file_name, True) This should work. If the above doesn't work please let me know. You can also define the maximum message length via environment variables. You just need to define the number under Hope this helps! If so, please mark the response as answer to the discussion so that others can benefit from it! |
Beta Was this translation helpful? Give feedback.
Hi @Indrajeetrt! Thanks for opening this discussion.
Starting on 25R2, files can be streamed to the Discovery instance (preventing this problem you are seeing). However, I can see from your code that you are using 25R1.
See
pyansys-geometry/src/ansys/geometry/core/modeler.py
Lines 450 to 451 in 24eeafa
You are also mentioning that you are using the remote capabilities. However, if Discovery is in the same machine where your Python script is running, you can let Discovery know that it can take the file from the file system (avoiding the upload and thus the error). You would just need …