| Reference | Downloads | Github

Getting feedback

I am using PsychoPy3, and am trying to give feedback to participants after entering specific key presses while watching a video. I have taken the code from the builder-providing feedback recipe, and changed it to match my terms. However, after running the experiment, feedback is not showing up, and instead, I am getting an error message:

ifresponses.corr:#stored on last run routine
NameError: name ‘responses’ is not defined.

I’ve made sure everything matches from the builder view to what I put in the code. Not sure why I’m getting the error. Below is what I have in my begin routine tab.

if not responses.keys :
    msg="Failed to respond"
elif responses.corr:#stored on last run routine
    msg="Correct! RT=%.3f" %(responses.rt)
    msg="Oops! That was wrong"

Thank you in advance!

The error message doesn’t match the code you provided (it’s an “if” rather than “elif” there), and if “responses” doesn’t exist when that code snippet runs, the error would occur on the first line (the first time that “responses” is referred to).

We probably need to see the full error message, but do you have any other custom code anywhere?

Thanks! It was a silly mistake. I found it.

Thanks again