Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Basic gRPC version not working

Tags:

python

grpc

I was trying to implement a simple gRPC server/client and have narrowed down the problem to even basic gRPC Python implementations not working on my machine.

Here is what I tried:

pip install grpcio grpcio-tools
git clone https://github.com/grpc/grpc.git
cd grpc/examples/python/route_guide
python run_codegen.py # Everything breaks whether I include this step or not
python route_guide_server.py

And getting the following error:

-------------- GetFeature --------------
Traceback (most recent call last):
  File "route_guide_client.py", line 119, in <module>
    run()
  File "route_guide_client.py", line 109, in run
    guide_get_feature(stub)
  File "route_guide_client.py", line 48, in guide_get_feature
    latitude=409146138, longitude=-746188906))
  File "route_guide_client.py", line 34, in guide_get_one_feature
    feature = stub.GetFeature(point)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/grpc/_channel.py", line 514, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/Users/p/anaconda/envs/py36/lib/python3.6/site-packages/grpc/_channel.py", line 448, in _end_unary_response_blocking
    raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
    status = StatusCode.UNIMPLEMENTED
    details = "Method not found!"
    debug_error_string = "{"created":"@1530451116.454542000","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1083,"grpc_message":"Method not found!","grpc_status":12}"
>

More detail on my machine config if useful.

like image 459
Peteris Avatar asked Jun 12 '26 23:06

Peteris


1 Answers

Realised that the port 50051 was occupied!

like image 149
Peteris Avatar answered Jun 14 '26 12:06

Peteris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!