Thank you Becca for your prompt reply.
When I disabled the video component, it ran smoothly. But I’m not sure whether it is due to chance as it runs smoothly with the video like 60% of the time.
Maybe it is because I’m running the experiment on 240hz monitor with eyetracker?
ps) after disabling the video stimuli, I ran the experiment several times to replicate the problem. The experiment crashed even with the video disabled, and I don’t think the scale might be the problem as it halts to a stop before it reaches the questions.
pps) I think I narrowed it down to the problem point. To make the cue not visible for half of the trials I’m using this line of code in the begin experiment section
**Begin Experiment**
#condition
block = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
random.shuffle(block)
left_loc = [loc1, loc2, loc3, loc4, loc5, loc6, loc7, loc8]
right_loc = [loc9, loc10, loc11, loc12, loc13, loc14, loc15, loc16]
and this line in Begin Routine section.
thisExp.addData('movie_time', time.time())
thisExp.addData('movie_tick', cv2.getTickCount())
random.shuffle(left_loc)
random.shuffle(right_loc)
opacity = 0.1
cue = 0.016
starttime = 0
num = trials.thisN
side = [0, 1]
side2 = random.choices(side, weights = (50, 50), k = 1)
side_rec = ''
if block[num] == 0:
opacity = 0
cue = 0
side_rec = 'none'
thisExp.addData('side', side_rec)
elif block[num] == 1:
if side2[0] == 0: #left 80%, right 20%
pos1 = left_loc[0]
pos2 = left_loc[1]
pos3 = left_loc[2]
pos4 = left_loc[3]
pos5 = left_loc[4]
pos6 = left_loc[5]
pos7 = left_loc[6]
pos8 = left_loc[7]
pos9 = right_loc[0]
pos10 = right_loc[1]
#record side
side_rec = 'left'
thisExp.addData('side', side_rec)
elif side2[0] == 1: #left 20%, right 80%
pos1 = right_loc[0]
pos2 = right_loc[1]
pos3 = right_loc[2]
pos4 = right_loc[3]
pos5 = right_loc[4]
pos6 = right_loc[5]
pos7 = right_loc[6]
pos8 = right_loc[7]
pos9 = left_loc[0]
pos10 = left_loc[1]
#record side
side_rec = 'right'
thisExp.addData('side', side_rec)
and everytime the ‘side_rec’ prints out ‘none’ the experiment crashes.