This is probably a wrong version problem. Have you installed previous
versions? Could you try:
import google.protobuf
print google.protobuf.__file__
On Tue, May 3, 2011 at 9:54 AM, William Tu wrote:
> Hi,
> I just downloaded the protocol buffer 2.4.1 and I followed the foo bar
> example for python.
>
> http://code.google.com/apis/protocolbuffers/docs/reference/python-generated.html
> However, I got an error when I call extend (the rest are fine)
>
> -
> foo = Foo()
> bar = foo.bars.add()# Adds a Bar then modify
> bar.i = 15
> foo.bars.add().i = 32 # Adds and modify at the same time
> new_bar = Bar()
> new_bar.i = 47
> foo.bars.extend([new_bar])
> --
> Traceback (most recent call last):
> File "", line 1, in
> AttributeError: 'RepeatedCompositeFieldContainer' object has no
> attribute 'extend'
>
> Am I using the wrong version of protocol buffer? My python is 2.6
> Thanks!
>
> William
>
> --
> 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.
>
>
--
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.