From 6c36e9fc450143ec7bb9f97327b370b603f74fb1 Mon Sep 17 00:00:00 2001 From: Amir Golparvar <amir.golparvar@physik.hu-berlin.de> Date: Wed, 18 Sep 2024 12:28:00 +0000 Subject: [PATCH] matching parser is failing to parse comments from excel files. Changelog: Fixed --- nomad/parsing/parser.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nomad/parsing/parser.py b/nomad/parsing/parser.py index 092d4ef508..f571e88690 100644 --- a/nomad/parsing/parser.py +++ b/nomad/parsing/parser.py @@ -362,11 +362,13 @@ class MatchingParser(Parser): try: comment = self._mainfile_contents_dict.get('__comment_symbol', None) - self._mainfile_contents_dict.pop('__comment_symbol', None) + tmp = self._mainfile_contents_dict.pop('__comment_symbol', None) table_data = read_table_data(filename, comment=comment)[0] data = table_data.to_dict() is_match = match(self._mainfile_contents_dict, data) + if tmp: + self._mainfile_contents_dict.update({'__comment_symbol': tmp}) except Exception: pass if not is_match: -- GitLab