Displaying a different set of pictures for each run of the experiment

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

OS: Mac OS Ventura
PsychoPy version : 2022,2,5
**What are you trying to achieve?:
I am a running a memory test on psychopy, where a contestant is shown 4 images at once, asked to memorise them, then shown 8 images one at a time and asked if the image is new or old. My experiment runs fine, however I would like it to loop around 50 times. I am working with a folder of around 800 images and an excel sheet to randomise each trial. The whole test works fine however for the sake of reliable results, I don’t want the participant to ever see the same picture twice. So once the first loop of the experiment is done, the 8 images used in the study and test phases shouldn’t come back for the remaining 49 loops. Does anyone know how I could achieve this ?

**What did you try to make it work?:
I tried using openpyxl, to edit my excel sheet by removing the images that have been used.
**What specifically went wrong when you tried that?
I think it might not be compatible with psychopy because the code ran fine but made no changes to the excel file.

Thank you for taking the time to read this query, any help or input would be appreciated.

If you mean within a single session then the easiest way is to use concentric loops where the outer loop goes through all the stimuli and either different inner loops are activated based on the value of outer loop.thisN or instructions are set to appear at intervals. (contineRoutine=False when condition not satisfied)