diff --git a/neo/rawio/spikegadgetsrawio.py b/neo/rawio/spikegadgetsrawio.py index 365d784e3..950440d6f 100644 --- a/neo/rawio/spikegadgetsrawio.py +++ b/neo/rawio/spikegadgetsrawio.py @@ -143,6 +143,10 @@ def _parse_header(self): # as spikegadgets change we should follow this try: num_chan_per_chip = int(sconf.attrib["chanPerChip"]) + if num_chan_per_chip <= 0: # invalid value + raise KeyError + if num_chan_per_chip > 100000: # abnormal large value + raise KeyError except KeyError: num_chan_per_chip = 32 # default value for Intan chips