Beginner needs a (hopefully) quick bit of advice

OS Windows 10
Psychopy 2020.2.1

I’m trying to make a nested loop around two trials that are already looped, but every time I try to drag the new loop into place it just loops around one of the two trials and not both. I’ve done a few searches but the info turned up seems to be about creating nested loops in the coder interface which I’m not quite ready to get into yet. This is what I want to do:

Grateful for any advice. :slight_smile: Thanks!

@RobM , I’ve not seen this before, but try just clicking in the two locations you want your loop to start and end, rather than dragging with the mouse button down. If that fails, please share your psyexp file so we can take a look.

1 Like

Thanks, I’ve tried that, to no avail. I start the loop and move the pointer to where I wan the loop to begin:

But when I click the mouse to lay down the loop, it snaps back to here:

I hope I’m explaining that adequately. It’s quite perplexing, I’ve seen nested loops like this in Psychopy demos on Youtube and can’t see why I’m having this trouble.

thanks! :slight_smile:

Here’s the task so far:

numwordMod.psyexp (27.0 KB)

Sorry not sure why this is happening, I have added the loop in the attached without any issue.
numwordMod.psyexp (27.7 KB)

1 Like

Hi Both, for context, whilst running workshops I have run into this funky issue with participants (in a VERY small number of cases) - it is weird and we haven’t yet figured out exactly how to replicate it.

One way in which a participant did seem to solve it was by doing the following:

Click on experiment settings (cog icon)> on the “use version” drop down select one of the older versions and then reselect the newest version that you have installed.

I am afraid at this point I am still a bit baffled what is causing it - but would be curious to hear if that fixes it for you too!




I had run into the same problem too. I used PsychoPy 3.2.10.

How I solve it?
I closed all running programs on my computer and PsychoPy. When I reopened it again, the problem just miraculously disappear.


1 Like

Hi Becca, thanks for the suggestion, I set the version to 1.90.0, then back to 2020.2.10 and it didn’t help unfortunately.

Thanks very much for your help! :slight_smile: Much appreciated.

Out of curiosity - what happens if you try to add the outermost loop first, followed by the inner loops?

1 Like

Hi Becca
I’ve just created a new task to try setting up loops in different ways and it’s weird. It’s really hard to get the loops where I want them. I’ve set up an “instruction” page at the beginning, then three three routines, then a “thank you” page at the end. After a few tries I managed to set up a loop around the three routines, though it took several tries to get the loop to start and end where I wanted it to. Then, I tried to set up loops around the routines individually to mirror what I’ve tried to do above and again, I would create the loops where I wanted them to go by clicking to start the loop, creating a dot, then moving the pointer to where I wanted the loop to end. A dot appears under the pointer in the right place, but as soon as I click, the loop appears elsewhere, in the wrong place. There doesn’t seem to be any consistency to it, for instance when trying to place a loop around the middle routine, I’ve had the loop actually appear around the third routine once I clicked, and when reattempting it, I’ve had the loop appear around the second AND third routine when I’ve tried exactly the same procedure. It seems as if there’s something quite random going on and I’m a bit at a loss to explain why this is. It’s a real shame because I’m a technician at a University supporting Psychology students and was hoping to recommend Psychopy to the students, but at the moment I couldn’t, based on the hassles I’m having with this task. Thanks to DVBridges’ help above, I have got the task working fine, it’s working exactly as intended on my local machine, but when trying to upload to Pavlovia various errors appear that prevent it working online, and I have the student who requested this task waiting to start their study. I’m getting a bit stressed about it as I’d hate to disappoint them.
When I lay down the dots for the loop like this:
on clicking to create the loop the second dot jumps to the right:
I’d deleted the instruction and thankyou routines at this point to see if that made a difference.
It’s quite frustrating. Thanks for your help.

Hi Rob,

Sorry to hear you are experiancing this frustrating situation. With regards to the issue of loops, please can I check, do you have access to other devices where psychopy is installed? Is this something you encounter across other devices? As I mentioned, this is an issue that we are aware of but that has been difficult to pin down because of the rarity (I have encountered it twice across ~10 workshops, each with ~20-40 participants). The development team are aware of this issue and will try to fix it as soon as we have enough information to replicate it.

With regards to getting online, it is normal to encounter some errors (PsychoJS is young code - but getting better now we have a proffesional development team!). Usually errors can be fixed pretty quickly so long as one is familiar with the core resources. Since you mention that you are a beginner, and that you will be offering student support, let me share some of resources that might help there:

  1. The documentation Creating online studies from Builder — PsychoPy v2020.2
  2. Our Youtube Series, particularly this episode where we push a task online Tutorial 2: Intro to Pavlovia and how to push your Posner task online from PsychoPy - YouTube
  3. The crib sheet for implementing fixes with code translation errors (will mostly only apply if you are using code snippets, but there are many helpful points here nonetheless) PsychoPy Python to Javascript crib sheet
  4. The workshop materials that are entirely open and more in depth Building better experiments with — Workshops for PsychoPy 2020 2020

If you are experiancing a specific error when getting online, we recommend starting a new thread with the title of the error as the topic (or if a thread already exists with that topic comment on it to follow up).

Hopefully this information is helpful in providing support for getting online!


1 Like

Thanks Becca.