Hi Xiao, I'm using protoc compiler 3
> protoc --version libprotoc 3.0.0 any python protobuf version is shown as follows - In [1]: import google.protobuf In [2]: google.protobuf.__version__ Out[2]: '3.0.0b2.post2' Are these versions incompatible ? If so, could you please suggest a way to get the appropriate version if this version mismatch issue ? I cloned the protobuf git repository and built everything as suggested in the wikis so not sure how the versions became incompatible. Thanks Ranadheer On Saturday, April 2, 2016 at 6:16:15 AM UTC+5:30, Feng Xiao wrote: > > Can you check the protobuf runtime version? It seems you are using a > proto3 protocol compiler but the python protobuf runtime is still an old > version. > > On Fri, Apr 1, 2016 at 6:19 AM, Ranadheer Pulluru <[email protected] > <javascript:>> wrote: > >> Loading a generated python class is throwing below error - >> >> syntax = "proto3"; >> >> message Foo { >> string bar = 1; >> } >> >> > protoc --python_out=/u/pullurur/projects/samples/lib/python >> simple.proto >> >> In [1]: from simple_pb2 import Foo >> >> --------------------------------------------------------------------------- >> TypeError Traceback (most recent call >> last) >> <ipython-input-1-884a1959e005> in <module>() >> ----> 1 from simple_pb2 import Foo >> >> /u/pullurur/projects/samples/lib/python/simple_pb2.py in <module>() >> 20 package='', >> 21 syntax='proto3', >> ---> 22 >> serialized_pb=_b('\n\x0csimple.proto\"\x12\n\x03\x46oo\x12\x0b\n\x03\x62\x61r\x18\x01 >> >> \x01(\tb\x06proto3') >> 23 ) >> 24 _sym_db.RegisterFileDescriptor(DESCRIPTOR) >> >> TypeError: __init__() got an unexpected keyword argument 'syntax' >> >> >> >> -- >> 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 [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/protobuf. >> For more options, visit https://groups.google.com/d/optout. >> > > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
