Closed GoogleCodeExporter closed 9 years ago
Yeah, maybe this or just a new int_size: 8/16/32 option.
Original comment by Petteri.Aimonen
on 2 Jan 2015 at 7:35
That would be perfect. More explicit.
Original comment by denravon...@gmail.com
on 3 Jan 2015 at 10:03
This issue was updated by revision 50c67ecec489.
Original comment by Petteri.Aimonen
on 4 Jan 2015 at 10:18
Not sure I'm using it incorrectly but I get:
google.protobuf.text_format.ParseError: 1:1 : Message type "NanoPBOptions" has
no field named "int_size".
Original comment by denravon...@gmail.com
on 5 Jan 2015 at 7:15
Hmm, how are you using it?
And you are using the newest version from version control?
Original comment by Petteri.Aimonen
on 5 Jan 2015 at 7:24
stsolutions.Configuration.SensorDefinition.sensor_display_decimal_places
int_size:8
I'm on 7be7c7769f9532b2aca98e271540a565a6a321e6
Original comment by denravon...@gmail.com
on 5 Jan 2015 at 7:29
This is the full stack trace:
Traceback (most recent call last):
File "/Users/marco/dev/CentralUnit/Bridge/nanopb/../../Vendor/nanopb/generator/nanopb_generator.py", line 1201, in <module>
main_cli()
File "/Users/marco/dev/CentralUnit/Bridge/nanopb/../../Vendor/nanopb/generator/nanopb_generator.py", line 1151, in main_cli
results = process_file(filename, None, options)
File "/Users/marco/dev/CentralUnit/Bridge/nanopb/../../Vendor/nanopb/generator/nanopb_generator.py", line 1092, in process_file
Globals.separate_options = read_options_file(open(optfilename, "rU"))
File "/Users/marco/dev/CentralUnit/Bridge/nanopb/../../Vendor/nanopb/generator/nanopb_generator.py", line 979, in read_options_file
text_format.Merge(parts[1], opts)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/protobuf/text_format.py", line 265, in Merge
return MergeLines(text.split('\n'), message)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/protobuf/text_format.py", line 298, in MergeLines
_ParseOrMerge(lines, message, True)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/protobuf/text_format.py", line 229, in _ParseOrMerge
_MergeField(tokenizer, message, allow_multiple_scalars)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/google/protobuf/text_format.py", line 356, in _MergeField
message_descriptor.full_name, name))
google.protobuf.text_format.ParseError: 1:1 : Message type "NanoPBOptions" has
no field named "int_size".
Original comment by denravon...@gmail.com
on 5 Jan 2015 at 7:29
Actually, I'm on cc3c8732fd3f8505f46802dd54bd4a21c79b72aa
Original comment by denravon...@gmail.com
on 5 Jan 2015 at 7:33
Actually it's "int_size: IS_8" because it is an enum. See
https://code.google.com/p/nanopb/source/browse/tests/intsizes/intsizes.proto
But your error message is not because of that. It seems that the
nanopb_generator.py or nanob_pb2.py is not of correct version for some reason.
Maybe you need to re-run "make" in the generator/proto directory?
Original comment by Petteri.Aimonen
on 5 Jan 2015 at 7:47
I switched to IS_8 and now get:
google.protobuf.text_format.ParseError: 1:10 : Enum type "IntSize" has no value
with number 8.
I also tried:
Sally:CentralUnit marco$ pushd Vendor/nanopb/generator/proto
Sally:proto marco$ rm nanopb_pb2.py plugin_pb2.py
Sally:proto marco$ make
protoc --python_out=. nanopb.proto
protoc --python_out=. plugin.proto
Sally:proto marco$
But the error remains. I'll see if I can get it running in Linux/apt instead of
OSX/homebrew.
Original comment by denravon...@gmail.com
on 5 Jan 2015 at 8:00
The "Enum type "IntSize" has no value with number 8." error is much more
promising. It seems that you still had "8" instead of "IS_8" somewhere when you
got that error.
But I've now pushed a change that makes it work the same with "8" and "IS_8".
Original comment by Petteri.Aimonen
on 5 Jan 2015 at 8:33
You are absolutely right. I had an ":8" left. Changing it to IS_8 solved it,
thanks!
Original comment by denravon...@gmail.com
on 5 Jan 2015 at 8:40
Fix released in nanopb-0.3.2.
Original comment by Petteri.Aimonen
on 24 Jan 2015 at 3:53
Original issue reported on code.google.com by
denravon...@gmail.com
on 31 Dec 2014 at 2:50