Closed mayoreee closed 1 month ago
Several attempts to getDocuments using dapi-grpc Python client failed with InactiveRpcError
dapi-grpc
InactiveRpcError
Return documents
Throws error:
Exception: <_InactiveRpcError of RPC that terminated with: status = StatusCode.DEADLINE_EXCEEDED details = "Deadline Exceeded" debug_error_string = "{"created":"@1651832078.957738000","description":"Deadline Exceeded","file":"src/core/ext/filters/deadline/deadline_filter.cc","file_line":81,"grpc_status":4}" >
def getDocuments(stub, params, options): #print(params) document_request = platform_pb2.GetDocumentsRequest() document_request.data_contract_id = params['data_contract_id'] document_request.document_type = params['document_type'] document_request.where = params['where'] document_request.order_by = params['order_by'] document_request.limit = params['limit'] document_request.start_at = params['start_at'] document_request.start_after = params['start_after'] response = stub.getDocuments(document_request, options['timeout']) documents = [] for doc in response.documents: docBytes = doc[4 : len(doc)] documents.append(cbor2.loads(docBytes)) return documents
platform_pb2 imported from here: https://github.com/dashevo/platform/blob/v0.23-dev/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py
platform_pb2
@dashevo/dapi-grpc v0.23.0-dev.1
Python 3.9.10
darwin arm64
Please reopen if this issue still reproducting.
Several attempts to getDocuments using
dapi-grpc
Python client failed withInactiveRpcError
Expected Behavior
Return documents
Current Behavior
Throws error:
Steps to Reproduce (for bugs)
platform_pb2
imported from here: https://github.com/dashevo/platform/blob/v0.23-dev/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.pyYour Environment
@dashevo/dapi-grpc v0.23.0-dev.1
Python 3.9.10
darwin arm64