When calling my server for a type of message, I got the following error: Exception calling application: module \'grpc\' has no attribute \'experimental\', grpc-status: 2};
.
This error happened right after the server received the call. The service is able to validate the format of the message (if I pass a wrong format, I will receive the correct error)
I have other services running my server without any issues.
My server is defined as following:
Settings.load_settings()
server = grpc.server(
futures.ThreadPoolExecutor(max_workers=int(os.getenv("WORKER_NB")))
)
Compiler(server).compile_controllers()
SQLProvider()
# Add Health checking:
health_pb2_grpc.add_HealthServicer_to_server(health.HealthServicer(), server)
# Start the server:
server.add_insecure_port("[::]:{}".format(os.getenv("API_PORT")))
server.start()
logger.info("Server started")
server.wait_for_termination()
The main difference I can find in the call is that the protobuf message contains timestamps and enums. Is there an option to pass to the server ?
The proto message I am trying to pass looks like that:
syntax = "proto3";
import "google/protobuf/timestamp.proto";
enum En {
a = 0;
b = 1;
c = 2;
}
message ComputeRequest {
int32 a = 2;
google.protobuf.Timestamp start_date = 3;
repeated int32 ids = 7;
En en = 11;
}
message ComputeResponse {
float a = 1;
float b = 2;
}
service ComputeService {
rpc GetComputeResponse (ComputeRequest) returns (ComputeResponse) {}
}
grpc version: 1.54.2
Does on of you have any idea about how I can fix this issue ?