protoc

How do I correctly include golang protobuf/ptypes for protoc when using dep?

余生长醉 提交于 2019-12-24 11:35:52
问题 I'm having trouble including the google/protobuf/timestamp.proto well known type, when using dep. I get an error: google/protobuf/timestamp.proto: File not found service.proto: syntax = "proto3"; import "google/protobuf/timestamp.proto"; package com.rynop.platform; option go_package = "rpc"; service PlatformService { rpc Test(EmptyMessage) returns (EmptyMessage); } message EmptyMessage { } message A { string summary = 1; google.protobuf.Timestamp start = 2; } message B { repeated A foos = 1;

How can I add my own code to JAVA generated classes from proto file?

牧云@^-^@ 提交于 2019-12-24 07:16:11
问题 I'm using protobuf and I'm generating JAVA classes from the following proto file. syntax = "proto3"; enum Greeting { NONE = 0; MR = 1; MRS = 2; MISS = 3; } message Hello { Greeting greeting = 1; string name = 2; } message Bye { string name = 1; } option java_multiple_files = true; Now I need to add some code to the generated files and I found that is possible using a custom plugin (https://developers.google.com/protocol-buffers/docs/reference/java-generated#plugins). I'm trying to generate

Unable to compile .proto files for Tensorflow object-detection API

有些话、适合烂在心里 提交于 2019-12-13 20:06:29
问题 I'm trying to install Tensorflow and im having trouble compiling the .proto files. I try running this command in the research folder: C:/protoc/bin/protoc object_detection/protos/*.proto --python_out=. but it outputs: object_detection/protos/*.proto: No such file or directory Any idea why this is happening? 回答1: I have found a solution, it is cumbersome. It works if i compile them one by one. e.g. C:/protoc/bin/protoc object_detection/protos/anchor_generator.proto --python_out=. Where C:

Protobuf Compilation Issues

故事扮演 提交于 2019-12-12 18:33:28
问题 I've been trying to run a TensorFlow library and in order to do that I have to compile Protobuf libraries. I'm using the following command: C:\tensorflow-master\tensorflow\models>protoc object_detection/protos/*.proto --python_out=. The following error comes up: 'protoc' is not recognized as an internal or external command, operable program or batch file. I'm not sure what the issue is here. I'm running it out of the TensorFlow models directory, but it's still not recognizing protoc. 回答1: You

tensorflow Protobuf Compilation issue

筅森魡賤 提交于 2019-12-12 13:36:34
问题 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 anyone tell me what should I do? Thanks! 回答1: If your operating system is windows, then *. may not work. A good way to solve this problem is to use bash. Download git for windows, don't forget to select git bash when you install it. From tensorflow

Protocol buffer with node.js - failed to generate js from .proto

谁说我不能喝 提交于 2019-12-12 04:07:53
问题 Trying to use google protocol buffer in my node.js web server with this documentation. When running the following command: protoc --js_out=import_style=commonjs,binary: ServiceMessage.proto I received: --js_out: : Unknown option: import_style Any suggestions? Cheers, Itay 回答1: Per this discussion line, the js_out is added recently and merge at Feb 20, you may updated your protoc with latest codes from protobuf. 来源: https://stackoverflow.com/questions/36156425/protocol-buffer-with-node-js

How to define response headers for unary rpc

做~自己de王妃 提交于 2019-12-11 07:36:42
问题 In Go, I want to set some response headers from inside my rpc handler implementation. Specifically, I want to set some headers related to cache control. However, when the rpc is defined as unary response, the method signature generated by protoc only includes the request context and request message. This is in contrast to the code generated from a streaming response, which includes the request message and a grpc.ServerStream . Here's an example interface generated by protoc: type CmsServer

How to write a custom Protobuf CodeGenerator in Java

时光怂恿深爱的人放手 提交于 2019-12-10 14:25:01
问题 I'm trying to write a custom code generator for an in-house proprietary programming language. I figured I could write the generator in Java, using the protoc plugin guide. My main() does something like this: public static void main(String[] args) throws IOException { CodeGenerator gen = new CodeGenerator(); PluginProtos.CodeGeneratorRequest codeGeneratorRequest = PluginProtos.CodeGeneratorRequest.parseFrom(args[0].getBytes()); codeGeneratorRequest.getProtoFileList().forEach(gen::handleFile);

Cannot find `protoc` command

天大地大妈咪最大 提交于 2019-12-10 11:25:41
问题 When I run this: protoc --python_out=. .\object_detection\protos\anchor_generator.proto on a tensorflow object detection file on the command line, I get: 'protoc' is not recognized as an internal or external command, operable program or batch file. I followed all instructions in protoc object_detection/protos/*.proto: No such file or directory, but they never worked for me In addition to the searches I made, I tried this command: py-3.6 -m pip install protobuf and it works for me. I typed the

ImportError: cannot import name 'input_reader_pb2'

南笙酒味 提交于 2019-12-08 01:22:26
问题 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", line 49, in from object_detection.builders import dataset_builder File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\builders\dataset_builder.py", line 27, in from object