IndexError when running EGI_netstation demo in newer versions of PsychoPy

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win11
PsychoPy version (e.g. 2024.2.4 Py 3.8): 2026.2.4
Standard Standalone Installation? (y/n) If not then what?: yes
Do you want it to also run online? (y/n) no
What are you trying to achieve?: running the EGI_netstation demo (stroop.py)

What did you try to make it work?: In an older version of PsychoPy (2024.2.4), this demo runs without issue. In two newer installs, 2026.2.1 and 2026.2.4, this demo crashes with the error described below. All PsychoPy installs use openpyxl v3.1.5. It seems like something changed in the trial handling in trial.py for the latest versions of PsychoPy that broke this demo?

Link to the most relevant existing thread you have found:

What specifically went wrong when you tried that?:
Traceback (most recent call last):
File “C:\Users\username\Documents\psychopy_demos\Hardware\EGI_netstation\stroop_lastrun.py”, line 1047, in
run(
File “C:\Users\username\Documents\psychopy_demos\Hardware\EGI_netstation\stroop_lastrun.py”, line 830, in run
trials.saveAsExcel(filename + ‘.xlsx’, sheetName=‘trials’,
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\base.py”, line 324, in saveAsExcel
dataArray = self._createOutputArray(stimOut=stimOut,
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\trial.py”, line 1496, in _createOutputArray
thisLine.append(self.trialList[stimN][heading])
IndexError: list index out of range

Have you tried deselecting both “Save Excel file” and “Save .csv file (summaries)”? That resolved the issue for me.