Skip to content
Snippets Groups Projects
Commit ab6017e1 authored by Petteri Aimonen's avatar Petteri Aimonen
Browse files

Add better error message on Python library version imcompatibility (issue #240)

parent 9fdea3a3
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,20 @@ except:
try:
import proto.nanopb_pb2 as nanopb_pb2
import proto.plugin_pb2 as plugin_pb2
except TypeError:
sys.stderr.write('''
****************************************************************************
*** Got TypeError when importing the protocol definitions for generator. ***
*** This usually means that the protoc in your path doesn't match the ***
*** Python protobuf library version. ***
*** ***
*** Please check the output of the following commands: ***
*** which protoc ***
*** protoc --version ***
*** python -c 'import google.protobuf; print(google.protobuf.__file__)' ***
****************************************************************************
''' + '\n')
raise
except:
sys.stderr.write('''
********************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment