psychopy.org | Reference | Downloads | Github

Correct responses logged as incorrect

Hi, I saw this question was asked a few times but I couldn’t applied the advice to my experiment.
OS: Mac High Sierra
PsychoPy version: 3.2.4
What are you trying to achieve?: Figure out why all responses are logged as 0 in output file and post-trial feedback, even when correct key was pressed. I am running a semantic judgement task with forced choice (yes or no, defined by ‘m’ and ‘z’ key respectively). I’ve had this issue before, but ignored it because I could just create an excel template to correct this. The output file correctly logged the key that was pressed, so I can circumvent the problem by getting excel to compare CorrAns with the response made and return the correct value. The problem is that for this particular experiment I need to give participants feedback after every trial, and this comes up as incorrect every time.

What did you try to make it work?: Double checked that there are no typos in the parameter file, that $ is there before CorrAns in keyboard setting, that the correct keys (‘m’ and ‘z’) are correctly defined in the excel file and in the response settings
What specifically went wrong when you tried that?: Correct responses are logged as 0 in the output file, and post-trial feedback comes out with ‘else’ condition on all trials, even when correct response was made.

I am using builder and am totally clueless in Python. Hope this problem is really straightforward and has a silly solution.
Thanks!

Your description shows that you seem to be doing the right thing, yet still it doesn’t work. So we need to see exactly what you are doing rather than rely on a description. Show us screenshots of your keyboard component, show us the content of the first few lines of your conditions file, and any custom code you are using.

Thanks for your reply. Attached are screenshots of the keyboard component and the conditions file.
I managed to get it to work on a different experiment, but I don’t know what I did right…

21

Hi,

The problem is that Store is set to all keys. Even if you force end the routine after the first button press, the result will be stored as a list with one element (e.g., ["m"]), not as a string as defined in your input file (e.g., "m"). As ["m"] and "m" are not the same, all responses will be incorrect.

If you set Store to first key it should work.

Hope this helps.

Jan

2 Likes

Thank you so much. I knew it was some very silly mistake!

I have the exact problem and still unable to resolve it even after setting store all keys to the first key. The only difference in my experiment is that I have 12 letter choices compared to the 2 presented here. any pointers will be useful.
Thanks

I got this fixed!