This error results when you don't have spike arrays for a certain channel, but dat.electrode_mapping has the channel. If you get this error, check the column 'cutoff_time' in dat.electrode_mapping to see if any of your live channels have been cut off earlier than the others. If this is the case, consider re-starting your analysis with data_quality = 'Noisy'