Hello,
I am trying to transfer message from type loggerMessage from C to python 
over UART:
 
        status = pb_encode(&stream, loggerMessage_fields, &message);
        message_length = stream.bytes_written;
        int i=0;
        printf("\r\n");

        for (i = 0; i <message_length; ++i) {
           printf("%x",buffer[i]);
        }

In python when reading this and converting to binary, ParseFromString 
throws google.protobuf.message.DecodeError: Error parsing message:

    log = loggerMessage_pb2.loggerMessage()
    binary_str = binascii.unhexlify(answer)
    log.ParseFromString((binary_str))

What is the problem with the way I am sending/receiving? 

-- 
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/f2c67765-3a13-472d-a186-c75eb8ad4889n%40googlegroups.com.

Reply via email to