我只想完成一个简单的演示,但我得到了这个错误消息。
Traceback (most recent call last):
File "E:/grpc/biliService.py", line 10, in <module>
import hello_bilibili_pb2 as pb2
File "E:\grpc\hello_bilibili_pb2.py", line 21, in <module>
_HELLODEWEIREQ = DESCRIPTOR.message_types_by_name['HelloDeweiReq']
AttributeError: 'NoneType' object has no attribute 'message_types_by_name'
发布于 2022-04-21 09:19:51
grpcio==1.30.0
grpcio-tools==1.30.0
最新的grpcio
版本1.44.0
生成不兼容的pb2文件,所以我看到了同样的问题,我降低了grpcio 1.30.0
的等级,并且它起了作用。
https://stackoverflow.com/questions/71906577
复制相似问题