Interface files for the Calcualation Manager
Project description
The Calculation Manager Interface
This file defines the interface for the Calculation Manager
WOW-bug in grpcio-tools compiler --- "protoc".
it genrates import calculation_manager_pb2 as calculation__manager__pb2 Unfortunately, this style of relative path does not work in python3, only works in python2 For now the fix is literally to change the auto generated file manually like so: from . import calculation_manager_pb2 as calculation__manager__pb2 The file to change is /home/ncn/projects/CalculationEngine/CalculationManager/env/lib/python3.8/site-packages/ICalculationManager/calculation_manager_pb2_grpc.py More info in bug tracking: https://github.com/grpc/grpc/issues/11041 Solution then updated to move proto files into a separate folder to force correct relative paths :) See solution here: https://github.com/grpc/grpc/issues/9575#issuecomment-293934506
SOLUTION COPIED HERE:
Nevermind, I found the solution. I will quickly explain it in case anyone else is looking at this. I now moved my proto files into a directory called proto/some/folder/ Then using the following command, the module names and imports are correct and work as expected in python3: python3 -m grpc_tools.protoc -I proto --python_out=. --grpc_python_out=. proto/some/folder/*.proto Note that the combination of including the root directory (proto/) and directing the output to --python_out=. achieves the desired results: Generated files end up in some/folder/, also imports are as expected: import some.folder.someservice_pb2 as some_dot_folder_dot_someservice__pb2
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for ICalculationManager-ncn-0.0.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b68dbb8a4073b6407d5504023a41894a13190e81fcf47dbb8470fad103a0f7 |
|
MD5 | 89d619e18530e5a61f51e800eb773fc1 |
|
BLAKE2b-256 | cce3a5a7be7a64bfa8436e20bff2d3b8bd9615886c8be1d7c4b9aceaffddd50f |
Hashes for ICalculationManager_ncn-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43093e7cd0990fb8741c8704a8e34e18445c111c43bfcddb866e4342f41b52a8 |
|
MD5 | 0967b5728ddcc5b20b543c54f5553217 |
|
BLAKE2b-256 | 8ee430d1a060468659eb0472536aa94b9e3c54c3876b8a7e7abd071cf96cf70a |