68 questions
3
votes
3
answers
2k
views
gRPC/protobuf generated Python files use incorrect import statements
I have a grpc repo included in a python project repo as a submodule at src/grpc/protobuf with the following example structure:
protobuf/
|
|-data_structs/
| |-example_structA.proto
| |-...
0
votes
0
answers
46
views
Issue Decoding Protobuf Messages from Kafka in PyFlink Due to String Conversion
We are trying to consume Protobuf-encoded messages from a Kafka topic using PyFlink. However, we are encountering message parsing errors when attempting to decode the messages later in our pipeline.
...
0
votes
0
answers
121
views
Protobuf message from CPP to python
I have define my protobuf message that is serialize in CPP and send to Python program thank to a wrapper. On CPP side, the protobuf message is generate as std::string
Here is how I generate in cpp my ...
1
vote
2
answers
305
views
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 ...
2
votes
2
answers
1k
views
"TypeError: Couldn't build proto file into descriptor pool" with google-cloud-compute
I'm running a Python application on Ubuntu 22 with Python 3.13.0.
Since upgrading Python from 3.12, I get this error when running the application:
TypeError: Couldn't build proto file into descriptor ...
1
vote
2
answers
1k
views
Protobuf file not generating correct Python code with 'protoc --python_out' command
I have a .proto file defining a message called 'DeviationCreate'.
syntax = "proto3";
package proto;
option go_package = "proto";
option java_package = "deviationalert";
...
1
vote
1
answer
141
views
How is protobuf generating this method and is it impossible to get auto-complete for it?
I was looking at a code base (GCP SDK's monitoring API) trying to drill down to get familiar with some methods, but I hit a wall here: https://cloud.google.com/monitoring/custom-metrics/creating-...
0
votes
1
answer
149
views
Incorrect Protobuf classes are getting generated
I am trying out my first Protobuf sample code from the Protobuf documentation for Python.
https://protobuf.dev/getting-started/pythontutorial/
This is my .proto file.
syntax = "proto2";
...
1
vote
0
answers
496
views
protobuf installed but cannot be imported in Poetry environment
I created a Poetry environment with following toml file:
[tool.poetry]
...
[tool.poetry.dependencies]
python = "^3.10"
mlrun = "1.4.1"
pyyaml = {file = "PyYAML-5.4.1-cp39-...
19
votes
1
answer
2k
views
PySpark and Protobuf Deserialization UDF Problem
I'm getting this error
Can't pickle <class 'google.protobuf.pyext._message.CMessage'>: it's not found as google.protobuf.pyext._message.CMessage
when I try to create a UDF in PySpark. ...
2
votes
1
answer
806
views
Decode protobuf without proto files in python
I would like to decode protobuf.
Example of the protobuf data: 0a06282c0241057a10011805220d080510bea3f493062a03010c1628f1a6f493063002382b4001481482010f383634333233303532343736343839
I can Decoding ...
24
votes
2
answers
12k
views
Relative imports with ProtoBuf: Generating Python classes with ProtoBuf gives ModuleNotFoundError
Does protobuf support relative imports for python?
I have been unsuccessful in creating a protobuf build script that supports this. When generating python-classes from my .proto-files, I am only able ...
6
votes
1
answer
4k
views
Why python code generation from proto is not generating classes?
I'm currently trying to generate python code from a proto file.
My proto file looks like this:
syntax = "proto3";
package display;
message Hello {
uint32 version = 1;
uint32 value = 2;
...
3
votes
1
answer
3k
views
Failing to Import Files Compiled from Protobuf in Python
My directory structure is as follows:
test
|-test.py
|-test.proto
|-test_pb2.py
|-__init__.py
|-comm
|-comm.proto
|-comm_pb2.py
|-__init__.py
both __init__.py is empty
and test....
0
votes
0
answers
1k
views
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 ...