在使用DPF-Core时,使用以下代码报错。
from ansys.dpf.core import Model
from ansys.dpf.core import examples
path1 = examples.find_simple_bar()
path2 = examples.download_transient_result()
model = Model(path1)
print(model)
报错:
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNIMPLEMENTED
details = ""
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"", grpc_status:12, created_time:"2023-12-21T09:35:09.1882508+00:00"}"
>
解决:
搜了搜很多回答说以下方法可以:
关闭代理。
unset http_proxy; unset https_proxy; python server.py &
unset http_proxy; unset https_proxy; python client.py
我还发现额外的 options 可以传递给 grpc.insecure_channel 。</

文章讲述了在使用DPF-Core时遇到的gRPC错误,特别是_InactiveRpcError,通过关闭代理、调整grpc连接设置和使用`connect_to_server`函数连接服务器来解决问题。然而,连接服务器导致CPU占用过高,最终导致程序崩溃。
最低0.47元/天 解锁文章
1113

被折叠的 条评论
为什么被折叠?



