python 3.x – Google Protocol Buffers (protobuf) in Python3 – trouble with ParseFromString (encoding?)

python 3.x – Google Protocol Buffers (protobuf) in Python3 – trouble with ParseFromString (encoding?)

ParseFromString is a method — it does not return anything, but rather fills in self with the parsed content. Use it like:

message = MyMessageType()
message.ParseFromString(data)
print message.some_field

python 3.x – Google Protocol Buffers (protobuf) in Python3 – trouble with ParseFromString (encoding?)

Leave a Reply

Your email address will not be published. Required fields are marked *