From cc9ae9c146840943340596c1afc68fbd6e21a74a Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 31 Jul 2018 09:24:43 +0200 Subject: [PATCH] [bugfix] empty picks dictionary leading to KeyError --- pylot/core/io/data.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pylot/core/io/data.py b/pylot/core/io/data.py index 445af803..3802bfd3 100644 --- a/pylot/core/io/data.py +++ b/pylot/core/io/data.py @@ -506,6 +506,8 @@ class Data(object): # check for automatic picks print("Writing phases to ObsPy-quakeml file") for key in picks: + if not picks[key].get('P'): + continue if picks[key]['P']['picker'] == 'auto': print("Existing auto-picks will be overwritten in pick-dictionary!") picks = picks_from_picksdict(picks)