Need help with number of loops using the spreadsheet

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

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2024.2.4
Standard Standalone? (y/n) If not then what?:
I want to use the spreadsheet to pick a randomized number of loops within loops. Basically have Psychopy go though same images of dots with a randomized number of loops between 3-5 times and then show a image of a different number of dots once and then repeat the whole loop.
My issue is how I can use the spreadsheet to pick a number that represent a number of loop within a loop.

I’m not sure I quite understand your use case but two possibilities spring to mind:

  1. An outer loop pointing to a spreadsheet with a column called nLoops and then set the number of repetitions of the inner loop to nLoops
  2. A code component before the loop with nLoops = randint(3,6)

That’s what I did and this is the error I got:

Which of my suggestions did you try? Please could you either show the loop pointing to a spreadsheet with nLoops or a code component defining nLoops?

I tried your first option and I am seeing ‘not defined’ error:

Here’s the view of the timeline:

the image component for RSVP color bars:

The spreadsheet Pyschopy use to call the images
image

For the loop component:

RSVP != RVSP

Also, your flow doesn’t appear to have concentric loops

what is a concentric loop?

The outer loop could tell the inner loop how many times to repeat (and which spreadsheet or rows to use).