Python gprc AttributeError: 'NoneType' object has no attribute 'message_types_by_name'

Viewed 2528

I just want to complete a simple demo, but I got this error message.

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'
1 Answers
grpcio==1.30.0
grpcio-tools==1.30.0

the latest grpcio version 1.44.0 generate pb2 files Incompatible, so i seen same question, i downgrade grpcio 1.30.0, and it's worked

Related