Questions tagged [protobuf-python]

64 questions
1
vote
2 answers

Protobuf 3.19.1 and Python 3.10 issue

This is all about and issue when using the latest Python Protobuf (3.19.1) and Python 3.10, in Linux (tested in Fedora 35 and Ubuntu 20.04. It broke our library but it can easily tested using the addressbook.proto from the Python Protobuf tutorial…
Nuno Mariz
  • 561
  • 3
  • 8
1
vote
0 answers

how to debug invalid utf-8 in protobuf?

i'm working with some tensorflow code and trying to load a trained checkpoint, but it's failing with a protobuf error like this: [libprotobuf ERROR google/protobuf/wire_format_lite.cc:577] String field 'tensorflow.TensorShapeProto.Dim.name' contains…
ahihi
  • 73
  • 1
  • 5
1
vote
1 answer

protoc doesn't see files? (I'm doing something wrong)

I'm trying to run: protoc *.proto -python_out=. in the protoc directory inside of tensorflow > models > research > object_detection > protos, and it returns object_detection/protos/flexible_grid_anchor_generator.proto: File not…
tmckzs
  • 9
  • 2
1
vote
0 answers

Is there a way to compile protobuf and all its plugins together?

Right now I need to compile my protobuf and all the plugins(imported) separately.
0
votes
0 answers

Python Protobuf `MessageToDict` And `MessageToJson` with `include_default_value_fields` Does Add Defaults To `google.protobuf.BoolValue` Fields

I am attempting to use MessageToJSON and MessageToDict with the including_default_value_fields argument to generate a Pandas Dataframe that then gets written to Parquet. I have a deeply nested data structure that I am pivoting into a "flattened"…
AlexLordThorsen
  • 8,057
  • 5
  • 48
  • 103
0
votes
1 answer

Having an error when installing Scann on Google Colab

I installed scann on colab with code !pip uninstall protobuf>=3.20.3 but I had a error like that: "ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the…
0
votes
0 answers

Alternatives to pylint-protobuf

I use pylint with the plugin pylint-protobuf to typecheck the proto code. However, pylint does not support protobuf >= 3.20. (Source) Going back to an older version of protobuf is not an option. Are there alternative plug-ins to pylint-protobuf or…
KannarKK
  • 1,593
  • 20
  • 35
0
votes
1 answer

When constructing an instance of a Python protobuf message, I keep getting positional argument error

I'm using pb_2 and want to consturct instances of a message but keep facing positional argument error. I can construct instances from all other messages but when it comes to the following example, I get stcuk. I have the following three…
mahb
  • 39
  • 6
0
votes
0 answers

Match (lib)protoc version on Mac to Python protobuf==3.19.X

I'm using a Mac/Linux and I'm trying to get python code generated from a .proto file. When I run the protoc --version command in my terminal it returns libprotoc 22.5. When I run a terminal command like protoc --python_out=.…
Jed
  • 1,823
  • 4
  • 20
  • 52
0
votes
1 answer

Compiling Protobuf to Python giving unexpected results

Disclaimer: I am relatively new to Protocol Buffers, and python is not my language of choice. Most of my knowledge of protocol buffers has used them without compiling them, or having an IDE handle it as part of a deployment. I've been working on…
John Doe
  • 43
  • 3
0
votes
1 answer

Cleaning-up sphinx-doc protobuf types

I feel like I had this figured out before but it's not working again, I am developing some code based on protobuf and grpc and in the documentation all of the types come out really messily: create_session(name: str, path: str, file_type:…
iluvcapra
  • 9,436
  • 2
  • 30
  • 32
0
votes
0 answers

convert a protobuff bytes array(string) to json format?

I received a string that presents a protobuff as: "CoYBChVOZXRoZXJsYW5kcyg2OTBWIEwtTCkQCBoBMCAAKAEwATgCQ", I can convert it to read able string as: a{ b{ c1{ value: 2023 } c2{ value: 1 } } } but I need it…
esh
  • 1
  • 1
0
votes
1 answer

how to invalidate toxenv

I have some tox project that processes some protobuf in the install-deps phase and outputs some *pb.py codecs (custom script executed as install_command option in the config). When I'm updating my workspace (and the protobuf files are updated), i…
murison
  • 3,640
  • 2
  • 23
  • 36
0
votes
1 answer

SerializeAsString - server, ParseFromString - client. "Decode error" Exception occurred, but the data looks correct

Our application workflow uses protobuf for cross-language IPC. We have a C++ application publishing data over Linux shared memory to various clients on the same host. Data is published to shared memory using the protobuf API of "SerializeAsString",…
0
votes
1 answer

regex as protobuf message field name?

can we define regular expression in protobuf field name? I send the request as list of dictinary in client.py file "cur_cur_bin" : [{"cur_cur_bin1_bin3_bin1" : 4,"cur_cur_bin3_bin5_bin8" : 6} ] I defined .proto file like, int32…