You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everybody. I have the same issues when i compile the dataclass.
Can you give me some advice to fix it?)
I would be very grateful if you are able to help me
my proto file:
syntax = "proto3";
import "google/protobuf/struct.proto";
message Base {
google.protobuf.Struct data = 1;
}
output file, after compile:
# Generated by the protocol buffer compiler. DO NOT EDIT!
# sources: base.proto
# plugin: python-betterproto
from dataclasses import dataclass
import betterproto
from .google import protobuf # Wrong import <----------- Error here
@dataclass
class Base(betterproto.Message):
data: protobuf.Struct = betterproto.message_field(1)
https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/struct
These should map to
dict[str, any]
andany
The text was updated successfully, but these errors were encountered: