Blockindex error

MacOS 12.5
**PsychoPy version2021.2.3

I am new to coding and I am trying to run preexisting script and this is what pops up…

" blockindex= blockindex+1
NameError: name ‘blockindex’ is not defined"

How should I go about resolving this?

Hi @pkelly, it seems like blockindex does not exist (is not defined) when you run this code. So Python has nothing to add 1 to. You probably have to add blockindex = 0 to “Begin of experiment”.

1 Like