Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nanopb
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
le
nanopb
Commits
ab6017e1
Commit
ab6017e1
authored
8 years ago
by
Petteri Aimonen
Browse files
Options
Downloads
Patches
Plain Diff
Add better error message on Python library version imcompatibility (issue #240)
parent
9fdea3a3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
generator/nanopb_generator.py
+14
-0
14 additions, 0 deletions
generator/nanopb_generator.py
with
14 additions
and
0 deletions
generator/nanopb_generator.py
+
14
−
0
View file @
ab6017e1
...
...
@@ -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
(
'''
********************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment