How to check status in python client

485 views
Skip to first unread message

marton....@gmail.com

unread,
Aug 25, 2015, 10:33:54 AM8/25/15
to grpc.io
Hi Everybody,

How can I check gRPC status code from python client?

We have a gRPC service (written in c++) that returns Status(NOT_FOUND). However the client (written in python) times out. (ExpirationError, after timeout). How should I avoid the timeout and detect any, not OK status code?
On python side I've used the helloworld_pb2.early_adopter_create_Greeter_stub to create client stub.

Is it possible that python code still in early stage, and does not support checking status code? Or have I used wrong interface?

Thanks,
Marton

Nathaniel Manista

unread,
Aug 25, 2015, 2:21:06 PM8/25/15
to marton....@gmail.com, grpc.io
On Tue, Aug 25, 2015 at 7:33 AM, <marton....@gmail.com> wrote:
How can I check gRPC status code from python client?

You can't (yet).

We have a gRPC service (written in c++) that returns Status(NOT_FOUND). However the client (written in python) times out. (ExpirationError, after timeout). How should I avoid the timeout and detect any, not OK status code?
On python side I've used the helloworld_pb2.early_adopter_create_Greeter_stub to create client stub.

Is it possible that python code still in early stage, and does not support checking status code?

Not only is it possible, it is the case.

Or have I used wrong interface?

You haven't used the wrong interface.

Thanks for the report; we intend to have this need addressed in the next week. Here's the issue tracking our progress.
-N

marton....@gmail.com

unread,
Aug 26, 2015, 3:38:51 AM8/26/15
to grpc.io, marton....@gmail.com
Thanks! I'll follow that github issue.
Marton
Reply all
Reply to author
Forward
0 new messages