How to randomly select images

I am a second-grade student and were asked to design a simple experiment.
The picture shows the outline of my experiment.
What I need is to randomly select one image at a time from picture1, 2, 3, 4 and provide it to subjects.
Next is to provide another image from pictures that remain. and so on… until the last image is presented. (no repeating image)

My question is, I can’t even select images randomly… :sob: although I did try

I inserted a loop and set the “looptype” as random, but it didn’t work.
I guess I should use the “Conditions”, but I just can’t put a file in it.
So I guess some type of coding should be used here, which is absolutely beyond my knowledge. :sob:

Maybe it’s a simple question for most of people, but it really crashes me…
Really wish somebody could offer me some help :sob:


set up a csv. or Excel-file and load that via the browse button. In the Excel specify the pictures (with path) that you like to show.

BTW, if you press the help-button on the lower-left corner this will take you to a help-page on which the process is described.

Best Jens

first of all, thank you for your sincere reply. I am so happy to get my first reply in this unfamiliar world.
I’ve followed your advice and tried to set up a csv. or Excel-file, but unfortunately it didn’t work.
Here’s the information I’ve got when I tried to load the Excel-file format.

And when I tried to load it as a csv. format, it informed me that some of the functions might get lost if I save it this way. and images did get lost if I did that.

i feel like I am a idot… just hoping to get your reply sooner :sob:


You can’t load the images in your Excel-file. You need the filename of an image!. PsychoPy uses this as a pointer to your images.
Set up a folder called stim in experiment folder, copy all you images in this folder. Then set up an Excelfile with with at least one columns containing the filenames including extensions of your images. Pick a column heading, e.g. stimulus. For example, you have the images, picture1.jpg, picture2.jpg i nthe folder stim aso. Your Excel looks like



Use this Excelfile as a your Conditions.

You would really benefit from reading the documentation or even the book “Building Experiments in PsychoPy”. :wink: That prevents feeling like an idiot, at least sometimes.

Best jens

1 Like