Inserting a loop

Hello, I’m trying to build my experiment on builder, it’s essential for me to insert a loop from drop down menu, but when I try to do it, I need to specify loop elements first and it raises an error:
Traceback (most recent call last):
File “C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\builder\flow.py”, line 284, in insertLoop
startII = self.gapMidPoints.index(min(self.entryPointPosList))
ValueError: min() arg is an empty sequence

When I click ‘Insert Loop’ button in the flow menu, it lets me set the loop position first, then specify loop elements, and it works perfectly. How could I achieve this from the drop down menu? It used to work before, now it doesn’t work anymore. Any suggestions? Thank you!

Please could you explain why? I’ve never tried this.

You can insert loop from drop down menu in the experiment section, which asks to specify the loop elements first: image
Or you can insert it from the flow panel, which asks to specify the loop location first, then to specify loop elements, and it doesn’t throw an error: image
The thing is that my experiment is pretty long in the flow panel, and it’s very inconvenient to push the ‘insert loop’ button and then search the exact place in the flow where the loop should be inserted, but it’s just a suggestion :slight_smile: