2.2.0a-0.1ubuntu1 On Dec 28 2010, 2:55 pm, Kenton Varda <ken...@google.com> wrote: > Strange. It looks like there is a bug in the type checker for booleans -- > it will accept any integer. However, this doesn't explain the encoding > error. Looking at the code, I can't see how this could happen; any non-zero > integer value should result in 1 being written to the wire. The problem you > describe sounds like an obscure problem that happens in C++, but I can't see > why it would happen in Python. > > What version of protobufs are you using? > > > > > > > > On Thu, Dec 23, 2010 at 10:10 PM, BigBaaadBob <bigbaaad...@gmail.com> wrote: > > Turns out it is simple: put a big number into a bool. The encoding > > side doesn't complain, but the decoder does. A bug on my part, but > > suboptimal behavior for the library. > > > On Dec 22, 6:09 pm, Kenton Varda <ken...@google.com> wrote: > > > Can you provide a small, self-contained example program demonstrating > > this > > > problem? > > > > On Wed, Dec 22, 2010 at 4:52 PM, BigBaaadBob <bigbaaad...@gmail.com> > > wrote: > > > > I have Python code doing something like this: > > > > > m.whatever = somevalue; etc..... > > > > s = m.SerializeToString() > > > > m.Clear() > > > > m.ParseFromString(s) > > > > > And the m.ParseFromString throws "google.protobuf.message.DecodeError: > > > > Truncated varint." (And this is the only error thrown! If I print m I > > > > don't get any errors.) > > > > > It seems like protobuf should be able to read something it > > > > successfully creates, no? > > > > > Suggestions? > > > > > -- > > > > 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<protobuf%2bunsubscr...@googlegroups.c > > > > om> > > <protobuf%2bunsubscr...@googlegroups.c om> > > > > . > > > > 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<protobuf%2bunsubscr...@googlegroups.c > > om> > > . > > 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.