How to select condition files depending on participant number

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

OS (e.g. macOS 13.4.1):
PsychoPy version (e.g. v2021.2.3):
Standard Standalone? (y/n) If not then what?: yes

What are you trying to achieve?:
In essence, I am trying to run an experiment where each participant (001-050 or so) has their own condition file. This experiment was originally done with each participant utilizing the same condition file, but I have decided to give each one their own. I have each condition file made, however I just have no idea how to even get started.

What did you try to make it work?:
I have tried adding


To the beginning of the first routine, along with using “$CondFiles/ID_blockgen.csv” as the condition for its corresponding loop.

What specifically went wrong when you tried that?:

NameError: name ‘CondFiles’ is not defined,

I have no idea how to even go about defining the term for it to fill in to understand each condition file for each participant.

Please help!

$'CondFiles/' + ID + '_blockgen.csv'

Thank you, that helped out for the computer understanding what it was looking for. But then it gave this error:

“/Users/myname/Desktop/”, line 300, in importConditions
raise ValueError(msg % os.path.abspath(fileName))
ValueError: Conditions file not found: /Users/myname/Desktop/Psychopy_NegPosNeuDemo_DenisUpdated Practice Run/001_Condfile_run1part1.csv

I wouldn’t recommend running experiments from your desktop.

You file name in the error seems to be a very long file name straight on your desktop without a subfolder. The subfolder isn’t needed but you seemed to have on CondFiles in your original example.

I’m confused on what you mean? I have typically only run experiments on my desktop and they have ended up okay.

Apologies for so many replies, I have only been working with psychopy/working with any programs in the last few months and am still quite a beginner at it.

I mean that you should save the files in the documents areas of your computer and not the desktop area.