[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #11 on issue 153 by ctuf...@gmail.com: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 I ran into the problem described in #9, but instead of removing or renaming the 2.2 install, I had success linking the desired protobuf Python modules to the generator directory. For example, [2220] pwd /home/ctuffli/dev/nanopb-0.2.1/generator [2221] make protoc --python_out=. -I /usr/include -I . nanopb.proto [] pushd ~/dev/nanopb-0.2.1/example ~/dev/nanopb-0.2.1/generator [2223] make protoc -I. -I../generator -I/usr/include -ofileproto.pb fileproto.proto python ../generator/nanopb_generator.py fileproto.pb *** *** Could not import the precompiled nanopb_pb2.py. *** *** Run 'make' in the 'generator' folder to update the file.*** *** Traceback (most recent call last): File "../generator/nanopb_generator.py", line 17, in import nanopb_pb2 File "/home/ctuffli/dev/nanopb-0.2.1/generator/nanopb_pb2.py", line 12, in DESCRIPTOR = descriptor.FileDescriptor( AttributeError: 'module' object has no attribute 'FileDescriptor' make: *** [fileproto.pb.h] Error 1 [2224] pushd ~/dev/nanopb-0.2.1/generator ~/dev/nanopb-0.2.1/example [2225] rm nanopb_pb2.py* [2226] ln -s /home/ctuffli/dev/protobuf-2.4.1/python/google . [2227] make protoc --python_out=. -I /usr/include -I . nanopb.proto [2228] pushd ~/dev/nanopb-0.2.1/example ~/dev/nanopb-0.2.1/generator [2229] make protoc -I. -I../generator -I/usr/include -ofileproto.pb fileproto.proto python ../generator/nanopb_generator.py fileproto.pb Writing to fileproto.pb.h and fileproto.pb.c cc -ansi -Wall -Werror -I .. -g -O0 -o server server.c ../pb_decode.c ../pb_encode.c fileproto.pb.c common.c cc -ansi -Wall -Werror -I .. -g -O0 -o client client.c ../pb_decode.c ../pb_encode.c fileproto.pb.c common.c -- You received this message because this project is configured to send all issue notifications to this address. You may adjust your notification preferences at: https://code.google.com/hosting/settings -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #10 on issue 153 by zkfarmer: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 when import the module that generated by protoc in python shell, the error reproduced. I think that protoc compiler and the python's version of protobuf don't match, my experience is: first time, i contact with protobuf, hold that repository(use ubuntu 10.04) have not this software, so installed it by source code.Funny thing about that is it had been installed to system without me knowing. uninstall protobuf that had been installed by system, or just make sure they don't conflict, can solve this error. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #9 on issue 153 by bryanadams: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 I had the same problem from a fresh Ubuntu / Python / protobuffers install, but didn't want to reinstall the python libraries. So here's the problem in a nutshell: Ubuntu 10.04 / Python2.6 comes with a protobuf-2.2 library /usr/lib/pymodules/python2.6/google/protobuf /usr/lib/pymodules/python2.6/protobuf-2.2.0.egg-info However, if you install from source, the protobuf-2.3 library goes to /usr/local/lib/python2.6/dist-packages/google/protobuf /usr/local/lib/python2.6/dist-packages/protobuf-2.3.0.egg-info So you can solve that however suits your personal style: install 2.3 over the 2.2, blow away / rename the 2.2, whatever. I renamed the 2.2 install, and that fixed it. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #8 on issue 153 by marthaler: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 I recently ran into this same issue, and will reaffirm the issue of multiple versions being installed on the same machine. The problem was that the package installed with ubuntu was 2.2.0 and the most recent source package is 2.3.0. If you do a 'sudo make install' on the downloaded source package but do not run the "python setup.py install" from the same package, you will see the conflict (generated protocol files with protoc 2.3.0 and trying to use the python-protobuf 2.2.0 packages). -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #7 on issue 153 by jordanbg: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 Yes, that was the problem that I had. Reinstalling the python library fixed the problem. Thanks! -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #6 on issue 153 by hellwolf.misty: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 I got a similar problem today, and I found the reason caused my problem is I have a protoc executable in my PATH, which is not the same version of the python lib where I did ./setup.py install. The setup.py has sort of searching protoc executable machanism, and it doesn't check if versions are compatible. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Updates: Status: CannotReproduce Comment #5 on issue 153 by ken...@google.com: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 (No comment was entered for this change.) -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #4 on issue 153 by ken...@google.com: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 Well, descriptor.py clearly defines FileDescriptor: http://code.google.com/p/protobuf/source/browse/trunk/python/google/protobuf/descriptor .py#557 So I don't know what else could explain the problem. I did not see any such issue in testing. I think you should verify exactly what file Python is using when you import google.protobuf.descriptor and make sure it is up-to-date. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #3 on issue 153 by jordanbg: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 I don't think so, as this was a fresh install on a virgin machine. I installed protobuf, boost, and gsl for the first time. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #2 on issue 153 by ken...@google.com: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 Is it possible that the descriptor.py that it imported is from an older version of the protobuf runtime, not 2.3.0? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.
[protobuf] Re: Issue 153 in protobuf: 2.3 Python code not importing
Comment #1 on issue 153 by jordanbg: 2.3 Python code not importing http://code.google.com/p/protobuf/issues/detail?id=153 I realize I left a cryptic and potentially unuseful error message, but I didn't take the time to isolate the problem. However, if it helps, this was with Python 2.6. -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to proto...@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.