ansys.dpf.gate.errors.DPFServerException: a invalid argument error ocurred: missing countentity enum

报错代码如下:

import ansys
from ansys.dpf.core import Model
from ansys.dpf.core import examples

ansys.dpf.core.connect_to_server()

transient = examples.download_transient_result()
model = Model(transient)
model.plot()

解决:

去掉代码中的ansys.dpf.core.connect_to_server()。

很疑惑,在上一个回答中,我刚把它添加进去才解决了另一个问题,这里又需要把它去掉才能看到结果。

事实证明,当使用print(model)时需要把这句代码加上才会不报错,如果使用model.plot又需要把这段代码去掉,没有找到根本原因。

解决raise _InactiveRpcError(state)grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that ...-CSDN博客

你可能感兴趣的:(pyansys,ANSYS,python,有限元分析,pyansys)