NameError when adding feedback after block

Beginner to PsychoPy here. I’ve already read this post before posting this question.

OS : macOS 10.14 (Mojave)
PsychoPy version : 3.0.3
**Standard Standalone? ** y
What are you trying to achieve?:
I want the participants to see their performance (% trials correct) after each block, but psychopy doesn’t recognize the name of the keyboard component.

What did you try to make it work?:
I followed these instructions from the psychopy website.

This is my flow panel and the name of the keyboard component below:

51%20PM

Under “blockFeedback” I added a code component:
Here’s the code in Begin Experiment:

chooseImageRe.data['resp.corr']

msg="feedback not working"

Code in Begin Routine:

meanRt=chooseImageRe.data['imageResponseKey.rt'].mean()
msg = "You got %i tirals correct (rt=%.2f)" %(nCorr,meanRt)

What specifically went wrong when you tried that?:
This error came up when I tried to run the experiment:

Why is psychopy not recognizing the name of my keyboard component?

Hi @avo, PsychoPy is failing to recognise chooseImageRe and so throws the NameError, but without more information I cannot see why. Currently, the only keyboard component I can see is a keyboard component called ImageResponseKey.

I solved the problem. I forgot to change the text component containing $msg to “set every repeat.” My mistake!