Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseError: 21:11 : Message type "object_detection.protos.Initializer" has no field named "random_normal_initializer".Message type "object_detection.protos.Initializer" has no field named "random_normal_initializer". #25

Open
Karan-K25 opened this issue Mar 24, 2022 · 2 comments

Comments

@Karan-K25
Copy link


ParseError Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 config = config_util.get_configs_from_pipeline_file(CONFIG_PATH)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\object_detection\utils\config_util.py:139, in get_configs_from_pipeline_file(pipeline_config_path, config_override)
137 with tf.io.gfile.GFile(pipeline_config_path, "r") as f:
138 proto_str = f.read()
--> 139 text_format.Merge(proto_str, pipeline_config)
140 if config_override:
141 text_format.Merge(config_override, pipeline_config)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:719, in Merge(text, message, allow_unknown_extension, allow_field_number, descriptor_pool, allow_unknown_field)
690 def Merge(text,
691 message,
692 allow_unknown_extension=False,
693 allow_field_number=False,
694 descriptor_pool=None,
695 allow_unknown_field=False):
696 """Parses a text representation of a protocol message into a message.
697
698 Like Parse(), but allows repeated values for a non-repeated field, and uses
(...)
717 ParseError: On text parsing problems.
718 """
--> 719 return MergeLines(
720 text.split(b'\n' if isinstance(text, bytes) else u'\n'),
721 message,
722 allow_unknown_extension,
723 allow_field_number,
724 descriptor_pool=descriptor_pool,
725 allow_unknown_field=allow_unknown_field)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:793, in MergeLines(lines, message, allow_unknown_extension, allow_field_number, descriptor_pool, allow_unknown_field)
768 """Parses a text representation of a protocol message into a message.
769
770 See Merge() for more details.
(...)
787 ParseError: On text parsing problems.
788 """
789 parser = _Parser(allow_unknown_extension,
790 allow_field_number,
791 descriptor_pool=descriptor_pool,
792 allow_unknown_field=allow_unknown_field)
--> 793 return parser.MergeLines(lines, message)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:818, in _Parser.MergeLines(self, lines, message)
816 """Merges a text representation of a protocol message into a message."""
817 self._allow_multiple_scalars = True
--> 818 self._ParseOrMerge(lines, message)
819 return message

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:837, in _Parser._ParseOrMerge(self, lines, message)
835 tokenizer = Tokenizer(str_lines)
836 while not tokenizer.AtEnd():
--> 837 self._MergeField(tokenizer, message)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:967, in _Parser._MergeField(self, tokenizer, message)
964 tokenizer.Consume(',')
966 else:
--> 967 merger(tokenizer, message, field)
969 else: # Proto field is unknown.
970 assert (self.allow_unknown_extension or self.allow_unknown_field)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:1042, in _Parser._MergeMessageField(self, tokenizer, message, field)
1040 if tokenizer.AtEnd():
1041 raise tokenizer.ParseErrorPreviousToken('Expected "%s".' % (end_token,))
-> 1042 self._MergeField(tokenizer, sub_message)
1044 if is_map_entry:
1045 value_cpptype = field.message_type.fields_by_name['value'].cpp_type

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:967, in _Parser._MergeField(self, tokenizer, message)
964 tokenizer.Consume(',')
966 else:
--> 967 merger(tokenizer, message, field)
969 else: # Proto field is unknown.
970 assert (self.allow_unknown_extension or self.allow_unknown_field)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:1042, in _Parser._MergeMessageField(self, tokenizer, message, field)
1040 if tokenizer.AtEnd():
1041 raise tokenizer.ParseErrorPreviousToken('Expected "%s".' % (end_token,))
-> 1042 self._MergeField(tokenizer, sub_message)
1044 if is_map_entry:
1045 value_cpptype = field.message_type.fields_by_name['value'].cpp_type

[... skipping similar frames: _Parser._MergeField at line 967 (2 times), _Parser._MergeMessageField at line 1042 (2 times)]

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:967, in _Parser._MergeField(self, tokenizer, message)
964 tokenizer.Consume(',')
966 else:
--> 967 merger(tokenizer, message, field)
969 else: # Proto field is unknown.
970 assert (self.allow_unknown_extension or self.allow_unknown_field)

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:1042, in _Parser._MergeMessageField(self, tokenizer, message, field)
1040 if tokenizer.AtEnd():
1041 raise tokenizer.ParseErrorPreviousToken('Expected "%s".' % (end_token,))
-> 1042 self._MergeField(tokenizer, sub_message)
1044 if is_map_entry:
1045 value_cpptype = field.message_type.fields_by_name['value'].cpp_type

File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\google\protobuf\text_format.py:932, in _Parser._MergeField(self, tokenizer, message)
929 field = None
931 if not field and not self.allow_unknown_field:
--> 932 raise tokenizer.ParseErrorPreviousToken(
933 'Message type "%s" has no field named "%s".' %
934 (message_descriptor.full_name, name))
936 if field:
937 if not self._allow_multiple_scalars and field.containing_oneof:
938 # Check if there's a different field set in this oneof.
939 # Note that we ignore the case if the same field was set before, and we
940 # apply _allow_multiple_scalars to non-scalar fields as well.

ParseError: 21:11 : Message type "object_detection.protos.Initializer" has no field named "random_normal_initializer".

config

@nkulkarni3297
Copy link

nkulkarni3297 commented Aug 25, 2022

Has anyone been able to get the solution for this issue? Even I am facing the issue while running the following line...

config = config_util.get_configs_from_pipeline_file(CONFIG_PATH)

@Damodhar934
Copy link

@nkulkarni3297 Any update how to fix this error please , I'm getting the same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants