{"id":22495,"library":"types-grpcio-status","title":"types-grpcio-status","description":"Typing stubs for grpcio-status, version 1.0.0.20260408. Provided by typeshed. Updated in lockstep with the grpcio-status package. This is a stub-only package that adds type annotations to grpcio-status. Released weekly or as needed.","status":"active","version":"1.0.0.20260408","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["stubs","grpc","typing","typeshed"],"install":[{"cmd":"pip install types-grpcio-status","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime dependency for grpcio-status itself","package":"grpcio-status","optional":false}],"imports":[{"note":"grpcio_status is not the correct top-level package; the module is grpc_status.","wrong":"from grpcio_status import rpc_status","symbol":"grpc_status","correct":"from grpc_status import rpc_status"}],"quickstart":{"code":"import grpc\nfrom grpc_status import rpc_status\nfrom google.protobuf import any_pb2\n\ntry:\n    # your gRPC call\nexcept grpc.RpcError as e:\n    status = rpc_status.from_call(e)\n    if status:\n        print(f\"Error code: {status.code}, details: {status.details}\")","lang":"python","description":"Basic usage: import the stubs and use rpc_status to extract error details from a gRPC call."},"warnings":[{"fix":"Use 'from grpc_status import rpc_status'.","message":"Do not import from grpcio_status directly. The correct top-level module is grpc_status.","severity":"gotcha","affected_versions":"all"},{"fix":"Install grpcio-status: pip install grpcio-status","message":"The types-grpcio-status package is a stub-only package. Ensure you have the corresponding grpcio-status package installed, otherwise the stubs are useless.","severity":"deprecated","affected_versions":"all"},{"fix":"Pin both packages to compatible versions.","message":"The stub types may not perfectly match the runtime if the version of grpcio-status lags behind the stub version. Always keep both packages in sync.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install grpcio-status: pip install grpcio-status","cause":"Missing grpcio-status package or import path mistake.","error":"ModuleNotFoundError: No module named 'grpc_status'"},{"fix":"Check your grpcio-status version and ensure it supports rpc_status. Upgrade to a newer version: pip install --upgrade grpcio-status","cause":"The module or attribute may not exist in the installed version of grpcio-status.","error":"ImportError: cannot import name 'rpc_status' from 'grpc_status'"},{"fix":"Check that the exception is a grpc.RpcError and handle None case: if status is not None: ...","cause":"rpc_status.from_call(e) returned None because the error is not a proper gRPC status.","error":"TypeError: 'NoneType' object has no attribute 'code'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}