在python中从grpc客户端发送请求时出错

时间:2019-05-30 11:38:08

标签: python grpc

我已经在python中使用proto创建了grpc客户端和服务器。我低于错误。任何人都知道为什么我们会收到此错误?如何在grpc clien和服务器中处理流数据?

status = StatusCode.UNKNOWN
details = "Exception iterating requests!"
debug_error_string = "None"

服务器代码

    def sendData(self, request, context):
        details = any.Any(type_url="type url", value=b'value')
        return status_pb2.Status(code=200, message="fdf", details=[details])

客户代码

   def sendData(self):
      user = data_messages_pb2.user(id="12", type="1232")
      response = self.stub.UploadData(data_messages_pb2.data(id='123', user=user, data=b'123'))

0 个答案:

没有答案