Hey guys,

I'm not sure what's going on, but confusing me plenty. I have the following 
simple Enum I've been using for some time.

enum Status {
    UNKNOWN             = 0;
    QUEUED              = 1;
    IN_PROGRESS         = 2;
    COMPLETE            = 3;
    WAIT                = 4;
    INCOMPLETE          = 5;

I tried to add one more status field to it and then recompiled it, but it 
no longer seems to be functioning as it used to. This is primarily around 
the usage of Status.Name(value) to obtain the name given its integer value. 
I haven't modified the code that uses this at all, but after recompiling 
the .proto file it seems to have gone away. I don't think I've even changed 
version of protobuf, since that is checked into the repo and specifically 
pulls 2.5.0 down.

Looking at the old working one, dir(status_pb2) shows an attribute, 
_enum_type_wrapper, whereas that is not present on the newly compiled 
version. A bit of research shows that enum_type_wrapper.py seems to contain 
the necessary methods .Name and so on.

Does anyone know what may have changed or how I can get that .Name() method 
back? I never did anything special in the past to compile it with 
enum_type_wrapper as far as I'm aware, just 'protoc --python_out=./ 
status.proto'. Perhaps my memory just fails me? 

Thanks in advance.

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 protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to