Maximum number of routines

What is the maximum number of routines that can be assembled in the flow panel?
Is there even a maximum number or is it unlimited?

If you are asking this question, it is very likely that you are doing something wrong.

Even relatively sophisticated experiments likely have only a few types of routines, and maximise the use of loops and maybe some code snippets to get maximum flexibility and re-use out of them.

Large scale duplication is a likely warning that you need to re-conceptualise the way things are being implemented. So a better question would be “Here is a detailed explanation of my design and procedures. Here is a description of how I am currently attempting to implement it in PsychoPy (with screenshots). It looks like it is getting out of hand. Can anyone recommend a more efficient way of implementing my design?”

I don’t have a specific experiment in mind, I understand that it is most efficient to re-use trials and make use of loops etc. but I was wondering on a more theoretical level whether there was a limit to how many routines you could create in a flow panel.

No, there is no fixed limit.

But practically, large numbers are strongly indicative of a non-optimal implementation.

In my auditory priming experiment using a word recognition paradigm, I implemented 387 routines as per the instructions, but encountered an unexpected error near the end of the session: “Cannot find the audio file,” despite confirming the correct file path. This issue raises concerns about whether the large number of routines could be causing memory or file-loading limitations in the software. I have already verified the audio file paths and formats (e.g., .wav, 44.1 kHz), and the experiment runs smoothly until the later stages. Could this error be related to the high number of trials overwhelming system resources, or are there potential fixes, such as preloading stimuli, optimizing file paths, or splitting the experiment into smaller blocks, that might resolve the issue? Any insights into troubleshooting this problem would be greatly appreciated.

Hello @negar_sayadi

Do you really have 387 different routines or do you display 387 different stimuli using hard-coded routines? Please describe your experiment in more detail.

My experiments usually have an instruction routine, a GDPR-routine, a trial-routine (using loops to the warm-up and experimental trial), a feedback routine, if needed, and a good-bye routine. Once in a while I add a survey which is another routine. I never came close to 387 different routines.

Best wishes Jens