protocol-buffers

Protobuf error:Protocol message tag had invalid wire type

こ雲淡風輕ζ 提交于 2020-05-10 08:54:06
问题 I am having the following error when trying to read the message in java Exception in thread "main" com.google.protobuf.InvalidProtocolBufferException: Protocol message tag had invalid wire type. at com.google.protobuf.InvalidProtocolBufferException.invalidWireType(InvalidProtocolBufferException.java:78) at com.google.protobuf.UnknownFieldSet$Builder.mergeFieldFrom(UnknownFieldSet.java:498) at com.google.protobuf.GeneratedMessage$Builder.parseUnknownField(GeneratedMessage.java:438)

Using cmake to create protobuf / grpc cc files

ε祈祈猫儿з 提交于 2020-05-10 04:36:11
问题 If I want to recreate the following protoc command in cmake: protoc -I ../proto/ --cpp_out=. service.proto I use the following lines in cmake: file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto") PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles}) If I instead want to recreate the protoc command below: protoc -I ../proto/ --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` service.proto In the case above I am not able to determine how to change the cmake file,

Using cmake to create protobuf / grpc cc files

蓝咒 提交于 2020-05-10 04:36:05
问题 If I want to recreate the following protoc command in cmake: protoc -I ../proto/ --cpp_out=. service.proto I use the following lines in cmake: file(GLOB ProtoFiles "${CMAKE_CURRENT_SOURCE_DIR}/*.proto") PROTOBUF_GENERATE_CPP(ProtoSources ProtoHeaders ${ProtoFiles}) If I instead want to recreate the protoc command below: protoc -I ../proto/ --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` service.proto In the case above I am not able to determine how to change the cmake file,

protoc-gen-go-grpc: program not found or is not executable

三世轮回 提交于 2020-04-30 05:31:06
问题 go version : go version go1.14 linux/amd64 go.mod module [redacted] go 1.14 require ( github.com/golang/protobuf v1.4.0-rc.2 google.golang.org/grpc v1.27.1 google.golang.org/protobuf v1.20.0 // indirect ) I am running the following command: protoc -I ./src/pbdefs/protos/ --go-grpc_out=. src/pbdefs/protos/*.proto to generate my GRPC output files from .proto files, with I am getting an error protoc-gen-go-grpc: program not found or is not executable Please specify a program using absolute path

In a proto, how can I define a map as a custom option

試著忘記壹切 提交于 2020-04-16 02:43:24
问题 In my proto file, I want to define a map as a custom option, tried a few things but none is working. my metadata proto file: syntax = "proto2"; import "google/protobuf/descriptor.proto"; package com.util; option java_package = "com.util"; message MyMeta { optional bool needValidation = 1; map<string, string> fileMap = 2; } extend google.protobuf.FieldOptions { optional MyMeta meta = 80412; } my proto file syntax = "proto3"; package com.test; import "util/meta.proto"; import "google/protobuf

Protocol Buffers in Ionic

我们两清 提交于 2020-04-16 02:35:28
问题 Attempting to use Protocol Buffers in Ionic 4 to encode & decode messages. Have tried to use protobufjs and also google-protobuf, but can't get either to work. I have downloaded the protoc and used it to generate a bunch of _pb.js files, one for each .proto file. That's fine. Focusing on the protobuf example first. Here's the example code: import { load } from "protobufjs"; // respectively "./node_modules/protobufjs" load("awesome.proto", function(err, root) { if (err) throw err; // example

AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' object has no attribute 'append'

回眸只為那壹抹淺笑 提交于 2020-04-13 02:15:29
问题 I am building a transfer learning model on the MobileNetv2 pretrained model on Google Collab. Till yesterday, everything was fine. But, today, on executing #Create the base model(feature_extractor) from the pre-trained model MobileNet V2 _URL = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/2" feature_extractor = hub.KerasLayer(_URL, input_shape=(_TARGET_SIZE, _TARGET_SIZE,3)) I get the error: ---------------------------------------------------------------------------

AttributeError: 'google.protobuf.pyext._message.RepeatedCompositeCo' object has no attribute 'append'

房东的猫 提交于 2020-04-13 02:15:07
问题 I am building a transfer learning model on the MobileNetv2 pretrained model on Google Collab. Till yesterday, everything was fine. But, today, on executing #Create the base model(feature_extractor) from the pre-trained model MobileNet V2 _URL = "https://tfhub.dev/google/tf2-preview/mobilenet_v2/feature_vector/2" feature_extractor = hub.KerasLayer(_URL, input_shape=(_TARGET_SIZE, _TARGET_SIZE,3)) I get the error: ---------------------------------------------------------------------------

How can i write my own RPC Implementation for Protocol Buffers utilizing ZeroMQ

你。 提交于 2020-04-10 04:46:12
问题 According to the Google Protocol Buffers documentation under 'Defining Services' they say, it's also possible to use protocol buffers with your own RPC implementation. To my understanding, Protocol Buffers does not implement RPC natively. Instead, they provide a series of abstract interfaces that must be implemented by the user (Thats me!). So I want to implement these abstract interfaces utilizing ZeroMQ for network communication. I'm trying to create an RPC implementation using ZeroMQ

How can i write my own RPC Implementation for Protocol Buffers utilizing ZeroMQ

拜拜、爱过 提交于 2020-04-10 04:45:46
问题 According to the Google Protocol Buffers documentation under 'Defining Services' they say, it's also possible to use protocol buffers with your own RPC implementation. To my understanding, Protocol Buffers does not implement RPC natively. Instead, they provide a series of abstract interfaces that must be implemented by the user (Thats me!). So I want to implement these abstract interfaces utilizing ZeroMQ for network communication. I'm trying to create an RPC implementation using ZeroMQ