From ef182dfb2b20f5f8cd7b0d314e60c32d64ca0e6d Mon Sep 17 00:00:00 2001 From: Alessandra Trapani Date: Wed, 24 Jan 2024 15:18:40 +0100 Subject: [PATCH] update to work with versions v3.8.0 --- .../tiffimagingextractors/scanimagetiff_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/roiextractors/extractors/tiffimagingextractors/scanimagetiff_utils.py b/src/roiextractors/extractors/tiffimagingextractors/scanimagetiff_utils.py index 8e76eb44..db0ce382 100644 --- a/src/roiextractors/extractors/tiffimagingextractors/scanimagetiff_utils.py +++ b/src/roiextractors/extractors/tiffimagingextractors/scanimagetiff_utils.py @@ -40,10 +40,10 @@ def extract_extra_metadata( if "=" in x } extra_metadata = dict(**extra_metadata, **system_metadata_dict) - - additional_metadata_string = io.metadata().split("\n\n")[1] - additional_metadata = json.loads(additional_metadata_string) - extra_metadata = dict(**extra_metadata, **additional_metadata) + if "\n\n" in metadata_string: + additional_metadata_string = io.metadata().split("\n\n")[1] + additional_metadata = json.loads(additional_metadata_string) + extra_metadata = dict(**extra_metadata, **additional_metadata) return extra_metadata