Skip a randomized trial to replay later due to delayed response

Using PsychoPy 1.90.2.

I’m designing an experiment where if the participant didn’t respond within a time limit, this trial is skipped and will be put back in the trial list and used later before the experiment ends.

Basically, I have achieved stopping the trials when the time limits are reached, but I can’t figure out how to store the skipped trials and put them back in the loop.

What I imagine is something like:

(block1 is the name of the loop)

if block1_choice.keys == None:
    block1.trialList.append(thisBlock1)

But it doesn’t work.

I also found a similar post, but it is based on a sequential triallist, while I need a randomized triallist, which I’m not sure how to track each trial item and put them back if they’re skipped/stopped before there’s a response.

Thank you!
Nine