Key_resp.rt response time grows longer and is not reset despite clock.reset

OS (macOS Monterey 12.5):
PsychoPy version (v2024.1.1):
Standard Standalone

I am trying to collect the response times in each trial and append them to a list. My trial is simple: a cue image is shown on screen and a response time recorded using the keyboard routine. I force the end of the routine upon press of the only allowed key “space”. Using a code snippet, I record the time the participant took to look at the cue and press space (response time). Specifically, under “Each frame” I use:
if key_resp.keys: rt = key_resp.rt looktimes.append(rt)
The response times will be used for a rule that controls the experiment (i.e., “if average response time of last three trials is below a certain threshold do something”). All trials are in a sequential loop.

However, as the experiment moves forward, the response times only grow larger with each trial, recording response time relative to the experiment start it seems. Inspecting the code under the hood, however, after each trial the clock for key_resp is reset, at least I see: win.callOnFlip(key_resp.clock.reset) in the code block “if key_resp is starting this frame…”.

I tried including win.callOnFlip(key_resp.clock.reset) in my code snipped under “End routine” but this does not help. I need the response time since the trial began. How can I achieve this?

This will be fixed in 2024.1.2

Thank you Wake, I just stumbled over this entry. Thank you for fixing this and looking forward to the updated release!