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?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/d51adc64-8ce8-4d10-8963-8ab07491442c%40googlegroups.com.

Reply via email to