OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): PsychoPy 2021.2.3
Standard Standalone? (y/n) : yes
What are you trying to achieve?: I want to present to present odors, pictures and words to participants in a random order.
What did you try to make it work?: I have created an experiment with three loops controlling each stimulus type. I want to present 8 odors, 8 words and 8 pictures in random order. I have created an outerloop to randomize the order of the subtasks. My problem is that I only want to present one trial of each stimulus per outerloop. Essentially, I want psychopy to go through an show one odor, one word and one picture in random order in each iteration.
I have tried to implement a counter.
Begin Experiment: loop_number=0
Begin Routine: loop_number=+1
And I for each stimulus type in the loop I added Selected Row: $(loop_number-1)
What specifically went wrong when you tried that?:
This is the error code:
File “C:\Users\Luisa\Documents\PhD\Experiments\vAM_1week\v_AM_1week_lastrun.py”, line 282, in
trialList=data.importConditions(‘stim_pictures.xlsx’, selection=(loop_number-1)),
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\data\utils.py”, line 470, in importConditions
elif len(selection) > 0:
TypeError: object of type ‘int’ has no len()
I can’t seem to find a similiar topic, which really surprises me. Thank you in advance!