| Reference | Downloads | Github

Providing 'No Response' Feedback to Participants



I’m working on PsychoPy 1.85.2 in Builder view to create an experiment. My goal is a Visual Dot Probe where a dot appears behind either an innocuous picture, or a picture of Alcohol. Participants must respond to the location of the probe with a key-press, and will have 1000ms to do so after stimulus presentation. The process then loops. This all works fine.

My issue is with needing to provide participants with feedback if they do not press a key. It is as simple a short ‘No Response’ text presentation if they do not respond within the 1000ms window. So far, since I am saving the correct key press into a .csv data file (with other information) for data processing, I check in a separate routine after stimulus presentation whether a key was logged for that presentation into that cell with the following:

if VisualProbeResponse.keys == ‘q’:
feedbackString = ’ ’
if not VisualProbeResponse.keys:
feedbackString = ‘No Response’
feedbackString = ’ ’

feedbackString is defined in the text box of Response Text as $feedbackString so that it will display ‘No Response’. Since I do not need a text presentation for a correct, incorrect, or any other response, I have simply left a space after feedbackString.

The code does work, but in reverse? If I press nothing, the screen is simply blank for a moment before moving to the next stimulus presentation. If I press literally any key on the keyboard, even those not defined as allowed keys by my response Keyboard component, ‘No Response’ will show. I’m struggling because it doesn’t crash or break necessarily, it simply isn’t working as I expected it to.

Thanks for any help anybody can give! Looking to get this cleared up!


  1. VisualProbeResponse.keys is a list, so it can never equal a single value. You have to compare like with like. Alternatives would be:
if VisualProbeResponse.keys == ['q']:   # compare to another list
if VisualProbeResponse.keys[0] == 'q':  # compare individual items
if 'q' in VisualProbeResponse.keys:  # look inside the list for the item
  1. Think like a computer. This code gets called at typically 60 times per second. The first time it runs is probably before the subject has had a chance to push a key, as it will be within their reaction time.

  2. We probably can’t help further at this stage as there seems to be missing information here. e.g. What determines the that the trial moves on to the next stimulus? Please provide more info.