On Thu, Feb 2, 2017 at 11:05 PM, ericYoon <[email protected]> wrote:

> I am new to python and also grpc. So this might be my fault.
>
> My grpc tool generates pb2 and pb2_grpc file into
> "/home/eric/dev/myproject/src/adminServer/" where my working directory is
> "src".
>
> In this case, my IDE and python command line display error like the
> following:
>
> *Error with pb2 file:*
>
> *command line (python 3.6):*
>
> File "/home/eric/dev/myproject/src/adminServer/adminServer_pb2_grpc.py",
> line 6, in <module>
>     import adminServer_pb2 as adminServer__pb2
> ImportError: No module named 'adminServer_pb2'
>
> *IDE (Eclipse/pydev/python 3.6):*
>
> "unresolved import adminServer__pb2"
>
> - adminServer_pb2_grpc.py file line 6 (import adminServer_pb2 as
> adminServer__pb2)
>
> --------------
>
> If I change the line 6 into the following, error disappears:
>
> from adminServer import adminServer_pb2 as adminServer__pb2
>
> *Error with pb2_grpc file:*
>
> *command line (python 3.6):*
>
>   File "/home/eric/dev/SPT_DIOT/MySingleSmartContract/src/
> ccodeServer/peerAgent_pb2_grpc.py", line 7, in <module>
>     import peerAgent_pb2 as peerAgent__pb2
> ImportError: No module named 'peerAgent_pb2'
>
> -----------
>
> I guess these errors were raised due to  python 3 import rule (these
> worked with python 2).
> If there is a way to make grpc tool generate python 3 compatible code, it
> will be wonderful...
>

No need for two discussion threads; let's answer these questions over here
<https://groups.google.com/d/msg/grpc-io/hpPnAGY0ksQ/VXS0SZE2AwAJ>.
-N

-- 
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/CAEOYnAQP8_TgXS3hnuXX%2B0Zd0Ph26ufs74TnPNG_%3DFbdA%2B51Sw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to