Open itaditya opened 6 years ago
@itaditya You should carefully read the error message mate. The problem is the example code had some error. You need to import import Calc_pb2_grpc
on Calc_Server.py
and replace with the Calc_pb2_grpc.CalculatorServicer
parameter of the Calculator
Class.
Then run python Calc_Server.py
Then go to the Calc_Client.py
file and import Calc_pb2_grpc
then replace with stub = Calc_pb2_grpc.CalculatorStub(channel)
instead of stub = Calc_pb2.CalculatorStub(channel)
You can check out the final code here, https://github.com/nafisfaysal/gRPC-Tutorial
Thank you. -- Nafis
@janakiramm I followed all the steps till the point where we have to start the Python server.
On running
python Calc_Server.py
I'm getting the error ->Traceback (most recent call last): File "Calc_Server.py", line 11, in
class Calculator(Calc_pb2.CalculatorServicer):
AttributeError: 'module' object has no attribute 'CalculatorServicer'
Versions -->