if this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. if you cannot immediately regenerate your protos, some other possible workarounds are: 1. downgrade the protobuf package to 3.20.x or lower. 2. set protocol_buffers_python_implementation=python (but this will use pure-python parsing and will be much slower).
时间: 2023-04-26 10:06:26 浏览: 14876
protoc-3.19.4-win64
如果这个调用来自_pb2.py文件,那么你生成的代码已经过时,必须使用protoc >= 3.19.重新生成。如果你不能立即重新生成你的protos,一些其他可能的解决方法是:1. 将protobuf包降级到3.20.x或更低版本。2. 设置protocol_buffers_python_implementation=python(但这将使用纯Python解析,速度会慢得多)。
阅读全文