I am trying to do a connection through grpc using:
import grpc
import class
def main():
channel = grpc.insecure_channel('localhost:50051')
stub = class_pb2_grpc.ClassStub(channel=channel)
list_data(stub)
if __name__ == '__main__':
main()
I get:
channel = grpc.insecure_channel('localhost:50051')
AttributeError: module 'grpc' has no attribute 'insecure_channel'
I am running this code in a docker with python 3.8.10
and this packages installed:
protobuf==3.18.0
grpcio==1.41.0
grpcio-tools==1.41.0
EDIT Also tried under grpc.aio using:
channel = grpc.aio.insecure_channel('localhost:50051')
And it returns:
AttributeError: module 'grpc' has no attribute 'aio'