| Reference | Downloads | Github

PsychoPy v3.0.0b12 Problem with end position of loop in Builder


Using Builder, I’m trying to build a loop around my trial, which has 4 routines. For some reason, the end of the loop always defaults to being after the 3rd routine. Has anyone else had this problem? I am new to PsychoPy, so I apologise if I’m missing something obvious.

I have tried using different numbers of routines, and as soon as I have more than 3 routines, the loop automatically ends after the 3rd, no matter where I click. I can change this manually in Coder, so it seems to be a Builder problem. This problem does not arise in PsychoPy2, so it seems to be specific to PsychoPy3.

OS: Win10
PsychoPy version: v3.0.0b12
Standard Standalone?: y

Thank you for your help,

Hi, can you tell us what code changes you make? This should isolate any issue.

Also, are you using any code components that determine whether particular routines run on a given trial?

Hi @Michael,

thank you for your reply. All I had to do in the code was to indent the other routines, so that they’re in the trial loop, instead of being outside of it.

I’m not using any code components. The experiment I built is very simple; every trial is the same (all routines run on each trial).

This also happens if I build an empty experiment. I have attached an example. When I try to insert a loop around everything, the end of the loop keeps jumping to between ‘intrRating’ and ‘eventDescr’.
test.psyexp (2.5 KB)

This is very mysterious. For me, the .psyexp file you sent has the intended flow you describe (with the loop encasing all four routines). Deleting and reinserting the loop works as expected, and the generated script formats properly. I am also using v3.0.0b12.

I’m a bit stumped here. Did you just download the latest standalone version of PsychoPy, or have you customised things in some way?

Thanks for your reply and help. It’s just the latest standalone version, I didn’t do anything to customise it.

I realised that I can – once the loop has been built – insert routines into the loop. So instead of creating all the routines and then inserting the loop around it at the end (as I had tried initially), I can create the loop and then insert routines into it. So that’s a workaround that does the job for me at the moment.

OK, that is definitely strange and the workaround shouldn’t be required. But unfortunately, unless we can find a way of replicating this issue, I’m not sure there is much else we can suggest at this stage.

Ok. Thank you so much for looking into this anyway. If I can be of any help trying to get to the bottom of this, please let me know.