I ran into this problem with protobuf 2.6.1 and PyDev 4.5.5. I tried the suggestions above, and none of them helped me in this matter. What ultimately got rid of the undefined variable errors when using protobuf enums was simple:
Access to enumeration on the protobuf object instance, and not on the protobuf module.
I'm not sure if this can be applied to the case of using OP, but in my opinion it was as simple as:
from myprotobuf_module import SomeProtobufMessage some_protobuf_object = SomeProtobufMessage() some_enum = some_protobuf_object.SOME_ENUM
source share