psychopy.org | Reference | Downloads | Github

Feedback is always Incorrect

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

OS: Win10
PsychoPy version: 3.2.4
What are you trying to achieve?:
I am designing a cued switching task for children, where they have to sort some toys based on their color or shape. The outline of the experiment is as follows:
There will be four stimuli: Red Bear, Blue Bear, Red Car, and Blue Car.
If the cue is for color, participants have to select either blue or red color, whereas if the cue is for shape, they have to select either bear or car. So, there are four response options: A=Blue, S=Red, K=Bear, L=Car.
The problem I am facing is that I have to provide feedback after each trial, but the feedback appears to be INCORRECT, no matter what the response is. Also in the data file, resp.corr is always zero.

What did you try to make it work?:
I tried to provide feedback by putting the code as given in: https://www.psychopy.org/recipes/builderFeedback.html

What specifically went wrong when you tried that?:
The displayed feedback is always INCORRECT and in the data file resp.corr is always zero.

Please help me find out the problem and solve it.

What do you have as the correct answers?

If your answers are in upper case they won’t match the key presses

Thank you for your response. I checked the answers, they were indeed in capital letters. I changed them into small letters as I have entered in the experiment design. Even after changing them to small letters, resp.corr is still zero.
In one of the topics on this forum similar problem was mentioned. I tried to add that code as well as given in that topic but it didn’t work.

Please could you post your current code and the keyboard component?


This is the keyboard settings.
image
This is the code I wrote using this link: Feedback depending on correctness of answer inside a trial
code_4 properties2

  • Your code runs at the beginning of the routine. No response has been made at that point, as the trial hasn’t started, so your message will always be set to “incorrect”.
  • Delete the first six lines of your code. Even if this code was running in the “each frame” tab, it would just be duplicating the function of the keyboard component itself, so it is not needed.
  • I’m guessing that the last four lines of your code could be retained but should be shifted to the “end routine” tab, if it is designed to set the text feedback on the next routine in the flow panel.
1 Like

I deleted the first six lines of the code and shifted the remaining code to the “end routine” tab. Still the problem persists.

You should also tell the keyboard component to store just one response, rather than all of them (I’m not at my computer at the moment so am not sure how PsychoPy could judge correctness if more than one response is allowed).

It finally worked. Thank you for your help.