From 58cd91d5083e7cc1b4e19f4cc705943ecd8f0ef5 Mon Sep 17 00:00:00 2001 From: Jie Luo Date: Thu, 17 Oct 2024 11:13:56 -0700 Subject: [PATCH] No public description PiperOrigin-RevId: 686979464 --- mediapipe/python/packet_getter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mediapipe/python/packet_getter.py b/mediapipe/python/packet_getter.py index cf6e7574a6..dc4af277a7 100644 --- a/mediapipe/python/packet_getter.py +++ b/mediapipe/python/packet_getter.py @@ -17,6 +17,7 @@ from typing import List from google.protobuf import message +from google.protobuf import message_factory from google.protobuf import symbol_database from mediapipe.python._framework_bindings import _packet_getter from mediapipe.python._framework_bindings import packet as mp_packet @@ -67,7 +68,7 @@ def get_proto(packet: mp_packet.Packet) -> message.Message: raise TypeError('Can not find message descriptor by type name: %s' % proto_type_name) - message_class = symbol_database.Default().GetPrototype(descriptor) + message_class = message_factory.GetMessageClass(descriptor) # pylint:disable=protected-access serialized_proto = _packet_getter._get_serialized_proto(packet) # pylint:enable=protected-access @@ -107,7 +108,7 @@ def get_proto_list(packet: mp_packet.Packet) -> List[message.Message]: except KeyError: raise TypeError('Can not find message descriptor by type name: %s' % proto_type_name) - message_class = symbol_database.Default().GetPrototype(descriptor) + message_class = message_factory.GetMessageClass(descriptor) # pylint:disable=protected-access serialized_protos = _packet_getter._get_serialized_proto_list(packet) # pylint:enable=protected-access