psychopy.org | Reference | Downloads | Github

Error in trying to get feedback based on correct answer

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

OS (MacOS Mojave):
PsychoPy version (3.1.2):
**Standard Standalone? Yes
What are you trying to achieve?:
Get a feedback message based on wether the response was correct or not.

What did you try to make it work?:
I’m currently using this code placed in the begin routine section,

msg = ' '

if key_resp_tutorial.corr:
    msg = "correct" 
else: 
    msg = "Wrong"

The correct answer is currently stored on the excel file and is being call upon using $corrANS in the next routine within the same loop called “feedback”. However, even if I change the correct answer to be, let’s say, a and press a it still shows the feedback wrong.

What specifically went wrong when you tried that?:
The message always provides me with the feedback that the input was wrong, regardless of wether it was right or wrong. There are no error messages.

I’m extremely new to psychopy, any help would be appreciated.