Hi,

I created a simple proto file:

message AgentEvent {
    required string agent_uuid = 1;
    repeated string keys = 2;
    repeated string values = 3;
}

Then I used protoc to generate a python module:

from google.protobuf import descriptor
from google.protobuf import message
from google.protobuf import reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)



DESCRIPTOR = descriptor.FileDescriptor(
  name='agentevent.proto',
  serialized_pb='\n\x10\x61gentevent.proto
\x12\x1as2grupo.triton.transceptor\">\n\nAgentEvent\x12\x12\n
\nagent_uuid\x18\x01 \x02(\t\x12\x0c\n\x04keys\x18\x02 \x03(\t\x12\x0e
\n\x06values\x18\x03 \x03(\t')




_AGENTEVENT = descriptor.Descriptor(
  name='AgentEvent',
  full_name='s2grupo.triton.transceptor.AgentEvent',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  fields=[
    descriptor.FieldDescriptor(
      name='agent_uuid',
full_name='s2grupo.triton.transceptor.AgentEvent.agent_uuid', index=0,
      number=1, type=9, cpp_type=9, label=2,
      has_default_value=False, default_value=unicode("", "utf-8"),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='keys',
full_name='s2grupo.triton.transceptor.AgentEvent.keys', index=1,
      number=2, type=9, cpp_type=9, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
    descriptor.FieldDescriptor(
      name='values',
full_name='s2grupo.triton.transceptor.AgentEvent.values', index=2,
      number=3, type=9, cpp_type=9, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      options=None),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  options=None,
  is_extendable=False,
  extension_ranges=[],
  serialized_start=48,
  serialized_end=110,
)

DESCRIPTOR.message_types_by_name['AgentEvent'] = _AGENTEVENT

class AgentEvent(message.Message):
  __metaclass__ = reflection.GeneratedProtocolMessageType
  DESCRIPTOR = _AGENTEVENT

When I import this to Eclipse (Python plugin) i get the following
error:

"undefined variable from import: FileDescriptor". Exploring the
soruces of a descriptor module, I can see FileDescriptor class is
defined.

What I am doing wrong? I'm using 2.4.1 version of protobuff.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@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.

Reply via email to