diff --git a/eqcorrscan/core/template_gen.py b/eqcorrscan/core/template_gen.py index 7f361497..dc7007f3 100644 --- a/eqcorrscan/core/template_gen.py +++ b/eqcorrscan/core/template_gen.py @@ -521,6 +521,12 @@ def _download_from_client(client, client_type, catalog, data_pad, process_len, "Pick not associated with waveforms, will not use:" " {0}".format(pick)) continue + if pick.waveform_id.channel_code is None: + Logger.error( + f"Missing waveform_id.channel_code for Pick {pick}.") + raise TemplateGenError( + "Ensure that all picks have complete " + "waveform_id attributes") if all_channels: channel_code = pick.waveform_id.channel_code[0:2] + "?" else: