You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What version of gRPC and what language are you using?
1.4.2 - python
What operating system (Linux, Windows, …) and version?
Windows 10.
What did you do?
Invoked following command line E:\work\experimental\grpc-example\bin\protoc.exe --proto_path=. --proto_path=E:\work\experimental\protobuf\3.3.2/src --grpc_out=E:\work\experimental\grpc-example\build\pc64\grpc-example\flattened/gen/python --plugin=protoc-gen-grpc=E:\work\experimental\grpc-example/bin/grpc_python_plugin.exe component\greeter\greeterslave_grpcservice.proto
What did you expect to see?
Generate python service code
What did you see instead?
Error - component/greeter/greeterslave_grpcservice_pb2.py: Tried to insert into file that doesn't exist.
Note: The error goes away if I add --python_out=E:\work\experimental\grpc-example\build\pc64\grpc-example\flattened/gen/python to the above command line.
I call this a bug because none of the other languages (I tested C++, C#, Ruby, JS, PHP) need --python_out arg when running grpc code generator plugin and I found no documentation reference that calls python as an exception.
Thanks.
The text was updated successfully, but these errors were encountered:
In our upcoming 1.7 release we've changed the code generator behavior to by default no longer insert into the _pb2.py file assumed to be present and available. In the meantime it sounds like the behavior you want is what is currently (pre-1.7) available using the (not-exactly-accurately-named) grpc_2_0 code generator flag. Take a look at this change to see the default behavior flip and this test to get a sense of how the code generator works in each case.
Okay, I'll try it out with 1.7. Just one thing I'd like to add. The _pb2.py files were indeed present in the problematic case as I was running a 2-step code generation (first for protobuf and second for grpc).
Regarding "The _pb2.py files were indeed present in the problematic case as I was running a 2-step code generation (first for protobuf and second for grpc)": I think that's expected, and counterintuitive and unhelpful, which is why we're changing the default to the more sensible behavior.
lockbot
locked as resolved and limited conversation to collaborators
Oct 1, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of gRPC and what language are you using?
1.4.2 - python
What operating system (Linux, Windows, …) and version?
Windows 10.
What did you do?
Invoked following command line
E:\work\experimental\grpc-example\bin\protoc.exe --proto_path=. --proto_path=E:\work\experimental\protobuf\3.3.2/src --grpc_out=E:\work\experimental\grpc-example\build\pc64\grpc-example\flattened/gen/python --plugin=protoc-gen-grpc=E:\work\experimental\grpc-example/bin/grpc_python_plugin.exe component\greeter\greeterslave_grpcservice.proto
What did you expect to see?
Generate python service code
What did you see instead?
Error - component/greeter/greeterslave_grpcservice_pb2.py: Tried to insert into file that doesn't exist.
Note: The error goes away if I add
--python_out=E:\work\experimental\grpc-example\build\pc64\grpc-example\flattened/gen/python
to the above command line.I call this a bug because none of the other languages (I tested C++, C#, Ruby, JS, PHP) need --python_out arg when running grpc code generator plugin and I found no documentation reference that calls python as an exception.
Thanks.
The text was updated successfully, but these errors were encountered: