jsPsych version (e.g. 7.3.1): My lab is working on a study that requires a “self scheduled” aspect. We want participants to be able to click on a group name and have an image from that group pop up (randomized images from the chosen group with each click). We have 9 groups and 14 images per group. We are having two problems: 1.) We can only get one image to pop up (only ever the same image from the same family) 2.) We are new to PsychoPy and we don’t know how to have each group name lead to a different group of images (corresponding to the chosen group). For problem 1, we have an excel file that contains a list of all of our image pngs with the file paths (as recommended). We have tried hard-coding the images in as well as creating paths in the image stimuli box. For problem 2, we have not found much help, but we have tried creating separate mouse stimuli for each group to lead to a separate loop which will present the images (this has not worked). PsychoPy code, and code errors linked below:
Why is your experiment looking for an image called 323
Is you experiment psyexp file in your Downloads folder? Please move it (and subfolders) to a dedicated folder, preferably in your documents area.
Do you really need so many text boxes? I’m just wondering whether you have text boxes with fixed text of which you are trying to show one, rather than having a single stimulus textbox set to update each repeat using the name of a column in your spreadsheet.
This thread might help with one of your questions about groups.
Hi Wakefield,
Thank you for your reply. The question about random allocation has been solved.
But I didn’t get what you meant by your questions. Are you talking about the " randomization " experiment I just activated?
Best wishes,
Qing
Thank you for the reply!
We were able to solve the first issue with only one image popping up out of the group, and now it cycles through the images like we wanted. We do need that many textboxes as it corresponds to the number of groups/categories we have.
It looks like the code in Jens’s reply might be what we need! We will give it a try
Hi again! Now, we are having some trouble with a loop. We want it to show one image at a time, but have a new image pop up every click. We need the text boxes to be on screen (as clickable stimuli) so participants can input their responses. When we run the experiment, it shows one image and when we click the correct stimuli, it ends instead of looping and showing the next image (linked in the Excel file). We are not sure what to do! Images of experiment and builder view attached.
If the experiment is ending after one click then either:
-
You haven’t attached a spreadsheet with multiple rows.
-
It is crashing and there should be an error message.
or
- You are ending on a response which is picking up the response from the previous trial so all of the trials end with a single click. In this case an ISI will help, or a minimum response time, or event.clearEvents() etc.
We have attached a spreadsheet with 17 rows. We found out that the issue was we incorrectly classified our indices referring to the images in the excel file! Thank you so much for the response!!