Questions tagged [protoc]

protoc is the compiler for .proto files. It generates language bindings for the messages and/or RPC services from .proto files. protoc is a native executable, the scripts under this directory build and publish a protoc executable (a.k.a. artifact) to Maven repositories. The artifact can be used by build automation tools so that users would not need to compile and install protoc for their systems.

taken from google documentation

387 questions
3
votes
4 answers

Protobuf and Python: How to add messages to "repeatable Any" field?

I have a proto message: syntax = "proto3"; import "google/protobuf/any.proto"; message Task { repeated google.protobuf.Any targets = 1; // ... } message Target { string name = 1; // ... } How should I add Target messages into…
Prisacari Dmitrii
  • 1,985
  • 1
  • 23
  • 33
3
votes
4 answers

How do I install a binary distribution of `protoc` for Python in Windows

Context This seems to be a question that has been asked several times before, but none of the answers I've found is clear enough and all of them seem to miss a step. I would like to use protocol buffer compiler in my Windows system. So that, I…
Isa
  • 53
  • 2
  • 9
3
votes
1 answer

bazel tensorflow protoc version mismatch

I tried to build a custom protocol buffer in bazel within tensorflow r1.12.0 (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)), but keep running into the following error message This file was generated by a newer version of protoc which is …
John Jiang
  • 827
  • 1
  • 9
  • 19
3
votes
2 answers

Importing proto file from different package

I have two services: Story and Tag. The files are structured in this way: Story |-- StoryService | `-- proto | `-- storyservice.proto `-- TagService `-- proto `-- tagservice.proto Each one of .proto files needs to use messages…
Ali Alhajji
  • 174
  • 2
  • 12
3
votes
4 answers

ImportError: cannot import name 'input_reader_pb2'

working on win10 64-bit when i trying to train my model by E:\projectx\model-master\models-master>python train.py --logtostderr --train_dir=training/ --pipeline_config_path=training/ssd_mobilenet_v1_pets.config this error appear File "train.py",…
3
votes
1 answer

from object_detection.protos import string_int_label_map_pb2 ModuleNotFoundError:

I'm using the offical code from tensorflow in python from github, but I dont get passed that error: import tensorflow as tf import cv2 cap = cv2.VideoCapture(1) # This is needed since the notebook is stored in the object_detection…
azach
  • 99
  • 1
  • 13
3
votes
1 answer

Is it possible to specify an ouput version when running protoc?

I am developing an application that must be cross compiled for a target that uses google protocol buffers version 3.0.0. Is there any way to specify in the protoc command (or .proto files) that generated code should be compatible with protocol…
Mike Godin
  • 3,727
  • 3
  • 27
  • 29
3
votes
0 answers

Protobuf for Python and protoc versions match still assertion fails

I am getting this error: ./google/protobuf/generated_message_util.h:86: const string& google::protobuf::internal::GetEmptyStringAlreadyInited(): Assertion `empty_string_ != __null' failed. I have been trying to fix this all day long. So the…
Kartik Shenoy
  • 308
  • 3
  • 14
3
votes
2 answers

Protocol Buffer import resolution

Before reading through this rather long question, I've raised a bug https://github.com/GoogleCloudPlatform/python-docs-samples/issues/1103. The documentation for Proto Packages and Name Resolution states You can use definitions from other .proto…
Jack
  • 10,313
  • 15
  • 75
  • 118
3
votes
3 answers

tensorflow Protobuf Compilation issue

I want to compile protobuf libraries for google object detection API. I followed the official tutorial and typed protoc object_detection/protos/*.proto --python_out=.. Then what I got is "object_detection/protos/*.proto: Invalid argument". Can…
sean
  • 49
  • 1
  • 8
3
votes
1 answer

how to compile protobuf message implement Parcelable with android studio protobuf plugin?

there was cmdline options to generate message implement parcelable like this: protoc --javanano_out=optional_field_style=accessors,parcelable_messages=true:d:\ ./message.proto how to do this with android studio protobuf plugin?
ycboy
  • 31
  • 4
3
votes
1 answer

Error finding custom protobuf plugin

When I try to generate code from .proto files using plugins I've downloaded, it works. For example, using the following works: protoc --python_out=. --plugin=protoc-gen-python=$GOPATH/bin/protoc-gen-python ./hello.proto and so does protoc --go_out=.…
staleMilk
  • 111
  • 1
  • 6
3
votes
2 answers

Class 'Google\Protobuf\Internal\Message' not found in "Message.proto"

I'm working on a project with protocol buffers and after i compiled a proto file, i cant seem to include it neither run it cos it keeps giving me this exact error: PHP Fatal error: Class 'Google\Protobuf\Internal\Message' not found in…
Fisnik Hajredini
  • 111
  • 5
  • 13
3
votes
1 answer

"Failed to parse input" from Google protocol buffers protoc command for ``--decode_raw``

I have a google protobuf file from OpenStreetMap, specifically I have the 1.4MB Liechtenstein country extract from Geofabrik. The protoc command says it "write the raw tag/values to stdout" with the --decode_raw option. However I keep getting this…
Amandasaurus
  • 58,203
  • 71
  • 188
  • 248
3
votes
2 answers

Building hadoop keeps failing, even though protoc 2.5.0 is set on my system

I am now trying to build hadoop using mvn after I finished its prerequisites. However, I get this message even though I have right version of protoc. I tried to rebuild protoc 2.5.0 several times already and every time all the tests of it would be…
TaeJun Lee
  • 31
  • 4