Try printing repeatRows to see if it is getting populated.
Thank you for your suggestion. I don’t know if I am using it right. I put the code in the Begin experiment and end routine, and these are the results.
Begin experiment
repeatRows = []
print('repeatRows',repeatRows)
End routine
if trials.thisN in [2, 3, 6] and task_resp.keys == 'n':
repeatRows.append(trials.thisIndex)
print('repeatRows',repeatRows)
I can’t understand these results, could you kindly explain it?
It looks like repeatRows is working correctly.
What does your trials_2 loop look like?
This is my trials_2 loop.
The condition file contains two parameters: main task and interruption task. I changed the number of the main and interruption tasks based on my professor’s suggestion. So my condition file looks something like this (and I change my trial loop setting to sequential).
Perhaps repeatTrials isn’t 1
I try to change the repeatTrial value from 0 to 3, but it doesn’t fix the issue. What is the value of repeatTrial should I change it to? Do you have any suggestions?
repeatTrials should be 1 if there are any trials to repeat.
Sorry for the misunderstanding. I set repeatTrial = 1 in the Begin experiment, but it still doesn’t work. Did I do something wrong?
In what way doesn’t it work?
Please could you upload your current files?
Sorry for not being clear. The experiment ended without any repetition. This is my latest file. Thank you for your consideration.
exp_con2.psyexp (89.1 KB)
main_conditions.xlsx (12.8 KB)
I tried to run it and got interrupt_condition is not defined. Where should interrupt_condition come from?
I put interrupt_condition in the same file as the main_condition (I named the condition file “main_condition”. It might be confusing, sorry about that). Column A (main_condition) is the main task, and column B (interrupt_condition) is the interruption task.
If you still cannot run the experiment, you can tell me anytime.