This error occurs :
if 'each_pmt_afterpulse_types' in self.config and channel in self.config['each_pmt_afterpulse_types']:
TypeError: argument of type 'NoneType' is not iterable
Change to each_pmt_afterpulse_types = {} solves it (thanks Joey for the help).
With each_pmt_afterpulse_types = None
This error occurs : if 'each_pmt_afterpulse_types' in self.config and channel in self.config['each_pmt_afterpulse_types']: TypeError: argument of type 'NoneType' is not iterable
Change to each_pmt_afterpulse_types = {} solves it (thanks Joey for the help).