OS: win10
PsychoPy version: 2021.1.4
Hi everyone,
I am conducting a basic two-back task with feedback messges. Now I am facing a problem that the feedback of every trial is always “Wrong!”.
I have no idea what went wrong so I changed the message from “Wrong!” to ”1!” and “2!” to see what would happen.
I found that no matter it was a correct answer or not, the feedback of the first trial would be “1!” and from the second trial to the final one, the feedback would be always “2!” no matter it was a correct answer or not.
This is my original code in my feedback code component.
#Begin Experiment
msg = ''
#Begin Routine
if corrAns == "space": #if the image is a target
feedback_duration = 0.5 #show the feedback message for 500 msec
if key_resp_practice.corr: #if you pressed space show a green positive feedback
msg = "Correct!"
text_feedback.color = [-1.000,1.000,-1.000]
else: #if not, show a red negative feedback
msg = "Wrong!"
text_feedback.color = [1.000,-1.000,-1.000]
else: #if the image is not a target
if key_resp_practice.corr: #if you correctly did not respond don't show anything
feedback_duration = 0
else: #if you responded, show a red negative feedback for 500 msec
feedback_duration = 0.5
msg = "Wrong!"
text_feedback.color = [1.000,-1.000,-1.000]
This is the new code ( only change the ” Wrong! ” to ” 1! ” and “ 2! ” ).
#Begin Routine
if corrAns == "space": #if the image is a target
feedback_duration = 0.5 #show the feedback message for 500 msec
if key_resp_practice.corr: #if you pressed d show a green positive feedback
msg = "Corret!"
text_feedback.color = [-1.000,1.000,-1.000]
else: #if not, show a red negative feedback
msg = "1!"
text_feedback.color = [1.000,-1.000,-1.000]
else: #if the image is not a target
if key_resp_practice.corr: #if you correctly did not respond don't show anything
feedback_duration = 0
else: #if you responded, show a red negative feedback for 500 msec
feedback_duration = 0.5
msg = "2!"
text_feedback.color = [1.000,-1.000,-1.000]
This is my text properties looks like.
And this is my keyboard properties looks like.
This is the corrAns column in my excel file.
I have no idea how to fix it, so any advice would be appreciated.
Thank you very much!