On Wed, Mar 1, 2017 at 7:51 PM, ericYoon <[email protected]> wrote:
> Hi, sorry for late reply. > Right back at you. :-) The IDE i am using is Eclipse 4.6.2 with pydev (PyDev for Eclipse > 5.4.0.201611281236) > > When I run python 3.5 and try to import the same error occurs. > > eric@diot:~/src/SPT_DIOT/snooopy/src$ PYTHONPATH=. python3 > Python 3.5.2 (default, Nov 17 2016, 17:05:23) > [GCC 5.4.0 20160609] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> from ccodeServer.grpcComm import ccodeMan_pb2 > >>> from ccodeServer.grpcComm import ccodeMan_pb2_grpc > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/home/eric/src/SPT_DIOT/snooopy/src/ccodeServer/ > grpcComm/ccodeMan_pb2_grpc.py", line 6, in <module> > import ccodeMan_pb2 as ccodeMan__pb2 > ImportError: No module named 'ccodeMan_pb2' > > After fixing import manually > Auto generated: import ccodeMan_pb2 as ccodeMan__pb2 > Manually fixed: from ccodeServer.grpcComm import ccodeMan_pb2 as > ccodeMan__pb2 > > >>> from ccodeServer.grpcComm import ccodeMan_pb2_grpc > >>> > > No more error occured. > > This might be my path issue but IMHO, import path does not accept relative > path from Pyhon 3 (in Pyhon 3, relative import path was accepted so there > was no such issue) > You may be using Eclipse with PyDev, but you're executing your _pb2.py and _pb2_grpc.py code generation at the command line outside of your IDE, right? What is the exact command that you're running to generate your code? -Nathaniel -- You received this message because you are subscribed to the Google Groups "grpc.io" 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/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CAEOYnARTn%2BCFMH4UKYAtn%3DzmXD8ttFmfwJvBt6Jx_XGyyhZ5Pw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
smime.p7s
Description: S/MIME Cryptographic Signature
