We get this error when using the Python code generated from our Protobf classes:
The name descriptor_pb2 can not be imported
The equivalent C ++ generated code works fine, so it will appear that there is no problem with our actual proto definitions.
This error occurs when I try and import my class, like:
import sys.path.append ('.. \ path \ To \ generate ') sys.path.append (' .. \ contrib \ Protobuf \ python ') FoBar_pb2 Import from FooBar
Is it ideal to add system paths?
I have a protocol for protobuf \ python \ google \
descriptor_pb2.py
but only descriptor.py
- we get the latest Version, so I think we do not have any files.
Does anyone know what the solution is?
No comments:
Post a Comment