Reputation: 1915
Context
Steps taken:
Environment Setup
I've installed protobufs via Home Brew
I've also followed the steps in the proto-bufs python folder's readme on installing python protobufs - namely running the python setup.py install
command
I've using the protobuf-2.4.1
files
Coding
I have a python file (generated from a .proto file I compiled) that contains the statement, among other import statements, but I believe this one is the one causing issues:
from google.protobuf import descriptor_pb2
The above python file, I'm importing in another python file, it's this python file that I want to write up logic for parsing the protobufs data files I receive
Error received
I get this error when running that file:
Steps taken to fix
protoc descriptor.proto --python_out=gen/
by coping and pasting it in the terminal in different places but couldn't get it to workQuestion
Upvotes: 1
Views: 5227
Reputation: 1915
I've discovered the issue. I had not run the python install instructions the first time I tried to compile this file. I recompiled the file and this issue was fixed.
Upvotes: 1