All Questions
Tagged with grpc-python protocol-buffers
56 questions
0
votes
0
answers
69
views
Getting Error Exception calling application: [Errno 5] Input/output error sometimes
my sample.proto file
syntax = "proto3";
package protofile;
import "google/protobuf/timestamp.proto";
import "google/protobuf/struct.proto";
option go_package = "./...
0
votes
1
answer
114
views
Converting django serializer data to google.protobuf.struct_pb2.Struct gives error: TypeError: bad argument type for built-in operation
I want to create a response message in grpc with the following format:
message Match {
int32 index = 1;
google.protobuf.Struct match = 2;
google.protobuf.Struct status = 3;
}
I have a ...
1
vote
1
answer
763
views
TypeError: Couldn't build proto file into descriptor pool: duplicate file name opentelemetry/proto/common/v1/common.proto in Docker
I'm encountering an issue when trying to build my Docker image. The error message I receive is:
TypeError: Couldn't build proto file into descriptor pool: duplicate file name opentelemetry/proto/...
1
vote
0
answers
128
views
Why is my protobuf map field represented as RepeatedCompositeFieldContainer in the generated Python code?
I have a .proto file that defines a message with a map<string, string> field:
syntax = "proto3";
message Message {
map<string, string> map = 1;
}
After generating the Python ...
0
votes
1
answer
521
views
Python 3.8 compatibility problem with Protos 5.27.0
I'm running a Python 3.8 app that is using some proto generated from a private repo. This integration was working until the generated code used the 5.27.0 version.
The error I'm getting is something ...
0
votes
1
answer
169
views
Passing standard input to grpc_tools.protoc and --decode Option Usage
The usage summary for the --decode option when --help is called with grpc_tools.protoc mentions that the option reads some binary from the standard input and writes it as text to the standard output. ...
1
vote
1
answer
2k
views
Protocol buffer data to python dictionary , gRPC message to Dictionary
I have data from gRPC.
Which is type of protocol buffer,
It looks like to dictionary, but it is not.
For my case:
The type of data: <class 'google._upb._message.RepeatedCompositeContainer'>
data:...
1
vote
1
answer
3k
views
ModuleNotFoundError when Importing gRPC pb2 File Generated by Protoc in Python
I'm encountering a ModuleNotFoundError when trying to import a generated gRPC module in Python.
In my project, I have a file structure like this:
from test.api.grpc_test_cases.specific_folder.api_pb2
...
0
votes
1
answer
514
views
gRPC client could not receive proper attribute when multiple enum is defined in one file
I defined two enum (AnsType and ErrorType) in a single .proto file and I used both of them in a message. However, the client can not parse both enum. Why does it happen and how can I solve it?
The ...
2
votes
0
answers
1k
views
Is it possible to use the remote grpc python plugin for `buf` to generate a Python Client Stub, but not generate the Servicer?
I'm working with buf to try to generate code for my grpc service. However, I don't want to create a Python service. I only want to use a Python client to talk to my service. Is there some option I can ...
1
vote
1
answer
2k
views
Is it mandatory to capitalize the enum variables in .proto files?
I want to create a enum of the following format but my proto extension throws an error, is it mandatory to capitalise enums and use only underscores ?
enum Language {
en = 0;
en-uk =1;
en-...
1
vote
0
answers
222
views
Purpose of bytes type in GRPC?
Can anyone explain in detail what is the purpose of using bytes in grpc? or when we can used bytes in grpc? or in which scenario we can used bytes data type? any one can give example on it?
0
votes
1
answer
1k
views
Python protofub: how to pass response message from one grpc call to another
I'm new to grpc/protobuf so please excuse any terminology errors in my question.
I need to take a response from one gRPC request and feed it into the next request. I can't figure out how to populate ...
2
votes
1
answer
2k
views
WHat is the difference between the filename_pb2_grpc.py and the filename_pb2.py files?
From what I understand, the pb2.py file is code from the protoc file and the pb2_grpc.py file is code generated by protoc from the .proto file. But I don't understand what that means. I am very ...
0
votes
1
answer
709
views
Python how to build dictionary from nested protobuf definitions
This is my first time working with grpc/protobuf tech. So far, so good I have coded grpc methods for simple (flat?) protobuf definitions. However I have run into nested protobuf declarations and have ...