Questions tagged [proto]

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

564 questions
100
votes
11 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…
83
votes
19 answers

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

I am trying to build a sample application with Go gRPC, but I am unable to generate the code using "protoc" I have installed the required libraries and Go packages using: go get -u google.golang.org/grpc go get -u…
Mayank Gupta
  • 1,779
  • 1
  • 13
  • 19
42
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
  • 962
  • 2
  • 11
  • 19
33
votes
3 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
  • 2,684
  • 3
  • 19
  • 20
25
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
  • 13,147
  • 9
  • 66
  • 95
22
votes
5 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
  • 361
  • 1
  • 2
  • 13
18
votes
9 answers

Protobuf timestamp not found

Relatively new to GRPC and getting an error in my proto file that I cannot seem to make sense of. I would like to send a time in a message using the "google.protobuf.Timestamp". I cannot seem to import it. What am I doing wrong? syntax =…
mornindew
  • 1,993
  • 6
  • 32
  • 54
16
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
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
  • 5,210
  • 3
  • 51
  • 71
14
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
  • 2,224
  • 3
  • 24
  • 39
12
votes
2 answers

[proto]: Importing the proto file in VSCode got not found error by IDE

Simply I have these directories in proof.proto I am importing the common_message.proto to be able to use the predefined message and Everything works fine -> [compiling proto files with no problem] but the only thing that annoys me is that my…
Thiti-Dev
  • 229
  • 2
  • 11
12
votes
1 answer

Could not make proto path relative and No such file or directory

go-dev -blog -blog-server -blogpb - blog.proto -other -dart i have a directory like that on my project blogpb is the directory where i create .proto file to dart directory, when i run this command: protoc -I=. --dart_out=$DST_DIR…
jhgju77
  • 1,021
  • 1
  • 6
  • 14
12
votes
1 answer

How to represent a JSON object variable with Proto definition

I want to define a request message in gRPC which should have a Json Object as a field For e.g. message UserRequest{ string name = 1; string city = 2; string email = 3; metainfo = 4;//A Json Object variable which can have any number…
pranay jain
  • 352
  • 1
  • 2
  • 15
12
votes
3 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…
Alana Storm
  • 164,128
  • 91
  • 395
  • 599
11
votes
1 answer

Oneof kind vs Enum in protobuf

What's the difference between using an Enum and a oneof kind in protobuf3? As far as I can tell, an Enum restricts the field to be one of a predefined set of values, but so does the oneof kind.
Victor Cui
  • 1,393
  • 2
  • 15
  • 35
1
2 3
37 38