Questions tagged [proto]

Related to Google Protocol Buffers, borrows its name from the .proto file extension containing a protocol schema.

433 questions
68
votes
6 answers

How to solve "AttributeError: module 'google.protobuf.descriptor' has no attribute '_internal_create_key"?

I encountered it while executing from object_detection.utils import label_map_util in jupyter notebook. It is actually the tensorflow object detection tutorial notebook(it comes with the tensorflow object detection api) The complete error…
24
votes
1 answer

Import and usage of different package files in protobuf?

I have imported an other proto which having different package name than mine. For usage of messages from other package, have accessed that message with package name. For Example : other.proto package muthu.other; message Other{ required float…
Muthurathinam
  • 513
  • 2
  • 5
  • 19
23
votes
1 answer

R: Passing a data frame by reference

R has pass-by-value semantics, which minimizes accidental side effects (a good thing). However, when code is organized into many functions/methods for reusability/readability/maintainability and when that code needs to manipulate large data…
Sim
  • 11,689
  • 7
  • 57
  • 85
22
votes
10 answers

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

I am trying to build a sample app with go grpc but I am unable to generate the code using "protoc" Have installed the required libraries/go packages using: go get -u google.golang.org/grpc go get -u github.com/golang/protobuf/protoc-gen-go Have…
Mayank Gupta
  • 691
  • 1
  • 5
  • 18
15
votes
2 answers

Understanding the __extends function generated by typescript?

I am playing with Typescript and trying to understand the compiled Javascript code generated by the compiler Typescript code: class A { } class B extends A { } Generated Javascript code: var __extends = (this && this.__extends) || (function () { …
14
votes
2 answers

Where to store proto files which are shared among projects?

I have project A and project B. They may be in different programming languages. Project A exposes an API using proto files, which project B will use to then generate the API in the programming language which project B uses. But where are the proto…
stwykd
  • 1,935
  • 1
  • 12
  • 17
13
votes
1 answer

Python protobuf gRPC generates a dependency that doesn't exist

I'm trying to create a gRPC binding for my python code via: python -m grpc_tools.protoc -I $(pwd)/protos --python_out=./fino/pb2 --grpc_python_out=./fino/pb2 -I=$GOPATH/src -I=$GOPATH/src/github.com/gogo/protobuf/protobuf $(pwd)/protos/* But the…
nmiculinic
  • 1,674
  • 15
  • 34
12
votes
4 answers

How to convert Google proto timestamp to Java LocalDate?

We need to convert Google Proto buffer time stamp to a normal date. In that circumstance is there any way to convert Google Proto buffer timestamp to a Java LocalDate directly?
Thirunavukkarasu
  • 241
  • 1
  • 2
  • 10
10
votes
3 answers

grpc organization in microservices

I'm creating a system using a microservices architecture. There are two microservices A and B, each living in their own repository. There is a user.proto file containing protobuf definition and gRPC method signatures. A uses generated user.pb.go as…
kskyriacou
  • 3,415
  • 2
  • 24
  • 50
10
votes
2 answers

What is in Object.__proto__?

In Google Chrom's javascript, objects have a property named __proto__ that points to their prototype (or parent) object. var foo = {}; console.log(foo.__proto__ === Object.prototype); //returns true However, this is not true for the Object…
Alan Storm
  • 157,413
  • 86
  • 367
  • 554
9
votes
3 answers

How to determine the geom type of each layer of a ggplot2 object?

As part of an effort to remove a specific geom from a plot I've already created (SO link here), I'd like to dynamically determine the geom type of each layer of a ggplot2 object. Assuming I don't know the order in which I added layers, is there a…
Erik Shilts
  • 4,093
  • 2
  • 23
  • 46
8
votes
1 answer

How to return a simple boolean value in ProtoBuffer?

in my proto file, I define a service interface: syntax = "proto3"; package mynamespace; import "google/protobuf/empty.proto"; service MyService { rpc isTokenValid (TokenRequest) returns (TokenResponse) { } } message TokenRequest { …
Jeff Tian
  • 4,481
  • 1
  • 38
  • 54
7
votes
1 answer

Cannot import external proto file - Works in commandline but not in .net core 3 RC1

I'm moving my gRPC app from .net framework to .net core I have two main proto files as follows /Proto/common/common.proto /Proto/my-service.proto my-service.proto importing common.proto as simple as this: common.proto syntax="proto3"; package…
bunjeeb
  • 965
  • 1
  • 13
  • 30
7
votes
2 answers

perl6 Need help to understand more about proto regex/token/rule

The following code is taken from the Perl 6 documentation, and I am trying to learn more about it before more experimentation: proto token command {*} token command:sym { } token command:sym { } …
lisprogtor
  • 5,057
  • 8
  • 14
6
votes
1 answer

How does the prototype object of an inherited class equal a new instance of the original class in JavaScript?

I have been learning about inheritance in JavaScript, and could not understand a line of code in the tutorial at https://www.tutorialsteacher.com/javascript/inheritance-in-javascript. The code is as follows: function Person(firstName, lastName) { …
Joon K
  • 125
  • 7
1
2 3
28 29