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
I'm facing the error AttributeError: 'google._upb._message.FileDescriptor' object has no attribute 'dependency' while I tried to execute the code below:
fromgoogle.protobufimportmessage_factoryfrommy.package.to.generated_file_pb2importCreateIntentsRequestmessage_classes=message_factory.GetMessages([CreateIntentsRequest.DESCRIPTOR.file]) # the error is thrown heremy_proto_instance=message_classes['my.package.to.generated_file_pb2.CreateIntentsRequest']()
I don't know how Protobuf works and if I'm doing something wrong here.
I aim to create a filled message based on my compiled message in *_pb2.py files.
I've noted that FileDescriptor doesn't have dependency but dependencies instead
Hello guys,
I'm facing the error
AttributeError: 'google._upb._message.FileDescriptor' object has no attribute 'dependency'
while I tried to execute the code below:I don't know how Protobuf works and if I'm doing something wrong here.
I aim to create a filled message based on my compiled
message
in*_pb2.py
files.I've noted that
FileDescriptor
doesn't havedependency
butdependencies
insteadprotobuf/python/google/protobuf/descriptor.py
Lines 1191 to 1192 in bce20aa
And the
message_factory.GetMessages
tries to access.dependency
.protobuf/python/google/protobuf/message_factory.py
Lines 163 to 169 in bce20aa
Am I missing something here? Is that a bug? Or just my lack of knowledge for this project?
Thank you in advanced
The text was updated successfully, but these errors were encountered: