diff --git a/processors/conversion/view_metadata.py b/processors/conversion/view_metadata.py index ab3d53f95..e8b27c87b 100644 --- a/processors/conversion/view_metadata.py +++ b/processors/conversion/view_metadata.py @@ -64,12 +64,13 @@ def process(self): metadata_file = json.load(file) parent_processor = self.dataset.get_parent().get_own_processor() - self.dataset.log(f"Collecting metadata created by {parent_processor.type}") - if not hasattr(parent_processor, "map_metadata"): - self.log.warning(f"Metadata formatter processor cannot run on {parent_processor.type}; has no 'map_metadata' method") - self.dataset.update_status("Cannot reformat metadata", is_final=True) + if parent_processor is None or not hasattr(parent_processor, "map_metadata"): + if parent_processor is not None: + self.log.warning(f"Metadata formatter processor cannot run on {parent_processor.type}; map_metadata method not implemented") + self.dataset.update_status("Cannot reformat metadata for this dataset", is_final=True) self.dataset.finish(0) return + self.dataset.log(f"Collecting metadata created by {parent_processor.type}") include_failed = self.parameters.get("include_failed", False) rows = []