From ce3dcda1133ab074e1491d64290eb8d7ecf5ce99 Mon Sep 17 00:00:00 2001
From: Amir Golparvar <amir.golparvar@physik.hu-berlin.de>
Date: Thu, 20 Apr 2023 09:27:12 +0000
Subject: [PATCH] Resolve "Tabular parser: multiple instances of different
 classes do not work"

---
 nomad/parsing/tabular.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/nomad/parsing/tabular.py b/nomad/parsing/tabular.py
index cb80c5dfa0..4aabfa114e 100644
--- a/nomad/parsing/tabular.py
+++ b/nomad/parsing/tabular.py
@@ -441,8 +441,9 @@ def parse_table(pd_dataframe, section_def: Section, logger):
                 sections.append(section)
             else:
                 try:
-                    section_name = path_quantities_to_top_subsection.pop().split('/')[1:]
-                    _append_subsections_from_section(section_name, sections[row_index], section)
+                    for item in path_quantities_to_top_subsection:
+                        section_name: List[str] = item.split('/')[1:]
+                        _append_subsections_from_section(section_name, sections[row_index], section)
                 except Exception as e:
                     logger.error(
                         'could not append repeating columns to the subsection',
-- 
GitLab