From ca5167cb04f3a1c5ebffd26c8fc0ee6799707c7b Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 30 Aug 2017 14:45:20 +0200 Subject: [PATCH] [bugfix] check type(picks) in dict/Attribdict --- pylot/core/util/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pylot/core/util/utils.py b/pylot/core/util/utils.py index 46a66eda..28dad3bb 100644 --- a/pylot/core/util/utils.py +++ b/pylot/core/util/utils.py @@ -9,6 +9,7 @@ import subprocess import numpy as np from obspy import UTCDateTime, read +from obspy.core import AttribDict from obspy.signal.rotate import rotate2zne from obspy.io.xseed.utils import SEEDParserException @@ -95,6 +96,8 @@ def excludeQualityClasses(picks, qClasses, timeerrorsP, timeerrorsS): for station, phases in picks.items(): for phase, pick in phases.items(): + if not type(pick) in [AttribDict, dict]: + continue pickerror = phaseError[identifyPhaseID(phase)] quality = getQualityFromUncertainty(pick['spe'], pickerror) if not quality in qClasses: