【发布时间】:2018-06-13 14:24:15
【问题描述】:
具有以下结构:
- project1
- project1.py
- protofile_pb2.py
- protofile_pb2_grpc.py
- project2
- project2.py
- protofile_pb2.py
- protofile_pb2_grpc.py
project1.py:
import protofile_pb2.py
...
project2.py:
import protofile_pb2
import project1
...
运行 project2.py 时,我收到此错误:
TypeError: Couldn't build proto file into descriptor pool!
Invalid proto descriptor for file "protofile.proto":
protofile.proto: A file with this name is already in the pool.
【问题讨论】:
标签: python protocol-buffers grpc file-descriptor