diff --git a/flexbe_core/flexbe_core/behavior_library.py b/flexbe_core/flexbe_core/behavior_library.py index 3ef3a54..963ea69 100644 --- a/flexbe_core/flexbe_core/behavior_library.py +++ b/flexbe_core/flexbe_core/behavior_library.py @@ -87,7 +87,13 @@ def _add_behavior_manifests(self, path, pkg=None): if os.path.isdir(entry_path): self._add_behavior_manifests(entry_path, pkg) elif entry.endswith(".xml") and not entry.startswith("#"): - mrt = ET.parse(entry_path).getroot() + try: + mrt = ET.parse(entry_path).getroot() + except ET.ParseError as exc: + Logger.logerr(f"XML parsing error while loading behavior manifest\n for '{entry_path}'\n" + f" {exc}\n skipping loading of '{entry}' ...") + continue + # structure sanity check if (mrt.tag != "behavior" or len(mrt.findall(".//executable")) == 0