Re: [protobuf] Re: python enum values option

2010-11-23 Thread Kenton Varda
I see, the problem is that you've created a copy of descriptor.proto and are extending that rather than extending the original file. To correctly extend descriptor.proto, you need to import it like: import "google/protobuf/descriptor.proto"; The path name is important, because it determines whi

Re: [protobuf] Re: python enum values option

2010-11-16 Thread Kenton Varda
That is strange. Can you provide a minimal but complete program that reproduces this problem, so I can look at it? On Wed, Nov 10, 2010 at 12:42 AM, Vsevolod Zadubrovsky < zadubrov...@gmail.com> wrote: > It seems to me, it doesn't work at all. > > I got this: > >(Pdb) import ooo > >(Pdb) vals_by

[protobuf] Re: python enum values option

2010-11-10 Thread Vsevolod Zadubrovsky
It seems to me, it doesn't work at all. I got this: >(Pdb) import ooo >(Pdb) vals_by_nums = >req.DESCRIPTOR.fields_by_name['error'].enum_type.values_by_number[req.error] >(Pdb) options = vals_by_nums.GetOptions() >(Pdb) options.Extensions[ooo.verbose_enum_value_option] *** KeyError: 'Extension "v