IIf this template helps then use it. If not then just delete and start from scratch.
OS (e.g. Win10): MacOS Catalina 10.15.7
PsychoPy version (e.g. 1.84.x): 2021.2.3
Standard Standalone? (y/n) If not then what?: Yes
What are you trying to achieve?:
Greetings.
I am creating an experiment that features randomized trials in 4 trials blocks. The blocks are also randomized. I would like to provide feedback on the participant’s overall performance at the very end, with a percentage that shows the total number of trials (out of 60) that they got correct. My spreadsheets have a correctAnswer column that specifies the correct key response, and my keyboard response component is set to store last key data and use $correctAnswer for correct answer.
What did you try to make it work?:
Following the instructions for the feedback at the end of a block on this page (Builder - providing feedback — PsychoPy v1.84.0) using a feedback routine. Please see attached images. I include what the loops/routines look like in builder, the code I use for the feedback screen, and initially got a msg error. I removed the independent text component from the routine, and it now flashes a new error (see attached images for the code I am using and the experiment design in builder)
What specifically went wrong when you tried that?:
Draft_lastrun.py", line 5753, in
nCorr = block1trials.data[‘response.corr’].sum()
NameError: name ‘block1trials’ is not defined
Although the instructions don’t specify to do so, I feel that I should probably be putting extra code somewhere in the trial block as well?