Minimal reproducible code:
service MyService {
rpc MyMethod(MethodRequest) returns (MethodResponse) {
option (google.api.method_signature) = "inputs,parameters";
}
}
message MethodRequest {
repeated google.protobuf.Value inputs = 1;
}
message MethodResponse {
google.protobuf.Value output = 1;
}
In the portion of the client method that constructs the request, the following lines occur
if inputs is not None:
request.inputs = inputs
This causes protobuf to raise an error because request.intputs is a repeated field.
The solution is to do the following instead:
if inputs is not None:
request.inputs.extend(inputs)
Minimal reproducible code:
In the portion of the client method that constructs the request, the following lines occur
This causes protobuf to raise an error because
request.intputsis a repeated field.The solution is to do the following instead: