I am new to protocol buffers, I am given a signal data saved in .protobin file and I am trying to parse the sensor data in python. I have installed the protoc compiler and compiled the example.proto file with python_out option and extracted example_pb2.py.
I read the file using the following script:
import example_pb2
with open('test_data.protobin','rb') as f:
data = f.read()
msg = example_pb2.Sensor()
msg.ParseFromString(data)The test_data.protobin data is 250Mb but the msg is empty and does not contain any information in it.
What am I doing wrong here?