From 42d7ecec9783c9a313b9798752b6ef55cef93b6a Mon Sep 17 00:00:00 2001 From: Antonino Ingargiola Date: Fri, 30 Sep 2016 12:15:18 -0700 Subject: [PATCH] FIX: avoid error when require_setup=False and no setup group is present --- phconvert/hdf5.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phconvert/hdf5.py b/phconvert/hdf5.py index 739c924..d164abd 100644 --- a/phconvert/hdf5.py +++ b/phconvert/hdf5.py @@ -603,6 +603,8 @@ def _normalize_detectors_specs(data_dict): def _normalize_setup_arrays(data_dict): """Make sure arrays of float in setup are arrays of floats.""" + if 'setup' not in data_dict: + return # Convert sequences of strings in 'setup' in arrays of floats # Useful when input is from YAML whose parser retrives floats a strings setup = data_dict['setup']