This exception is being thrown when *parsing* a message, not serializing.
It looks like the incoming message is invalid. Please make sure that the
string you pass to the parse method contains exactly the same bytes and is
exactly the same size as the bytes that were produced by the serializer.
It's also possible to get this exception if you changed the type of a field
in your proto definition in an incompatible way.
That said, parsing a 45MB message in Python will probably take a very long
time. And even in other languages, Protocol Buffers are not designed to be
so large. As a rule of thumb, if your messages are larger than 1MB, it's
time to start thinking about using a container format which lets you split
your data into many small messages.
On Mon, Oct 11, 2010 at 11:44 AM, Patrick wrote:
> I am currently having some trouble serializing a large python message
> (45 megs) that I can serialize in C++ and C#. Is there a limitation to
> the size of a message in python. This is the exception I am receiving:
>
> Traceback (most recent call last):
> File "C:\Python26\lib\threading.py", line 532, in __bootstrap_inner
>self.run()
> File "C:\Python26\lib\threading.py", line 484, in run
>self.__target(*self.__args, **self.__kwargs)
> File "D:\Code\c\lbmpymodule\Release\test_request.py", line 89, in
> handle_fis
>fis_response.ParseFromString(args[0])
> File "build\bdist.win32\egg\google\protobuf\message.py", line 160,
> in ParseFro
> mString
>self.MergeFromString(serialized)
> File "build\bdist.win32\egg\google\protobuf\reflection.py", line
> 1215, in Merg
> eFromString
>bytes_read = _DeserializeOneEntity(message_descriptor, self,
> decoder)
> File "build\bdist.win32\egg\google\protobuf\reflection.py", line
> 1059, in _Des
> erializeOneEntity
>raise RuntimeError('TODO(robinson): Wiretype mismatches not
> handled.')
> RuntimeError: TODO(robinson): Wiretype mismatches not handled.
>
> Thanks,
> Patrick
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en.