Same problem here, the _pb2_grpc.py is generated in a folder of my project 
toghether with the _pb2.py.
The _pb2_grpc.py tries to import the _pb2 from the python path (ie: import 
generated.interface_pb2 as generated_dot_interface__pb2)



Il giorno martedì 7 febbraio 2017 18:38:13 UTC+1, Nathaniel Manista ha 
scritto:
>
> On Thu, Feb 2, 2017 at 11:12 PM, ericYoon <[email protected] 
> <javascript:>> 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 "
>> someDir/src/adminServer/" where my working directory is "src".
>>
>
> Are you able to share with us the command you're running for this code 
> generation?
>
> In this case, my IDE
>>
>
> What IDE?
>
> and python 3.5 command line display error like the following:
>>
>> *Error with pb2 file:*
>>
>> 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'
>>
>> --------------
>>
>> If I change the line 6 into the following, error disappears: 
>>
>> from adminServer import adminServer_pb2 as adminServer__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 code compatible to python 3, 
>> it will be wonderful...
>>
>> Could anyone answer?
>>
>
> We're not yet aware of a circumstance in which generated code is valid in 
> Python 2 and invalid in Python 3.
>
> Are you able to share with us your .proto file(s)? Are you able to share 
> with us the smallest example code you can create that demonstrates the 
> problem?
>
> Our apologies for the trouble,
> -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/01730df8-65f8-4b47-a871-b46c99f630b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to