URL of experiment: Pavlovia
Description of the problem:
When I run my experiment online, I get this error message:
The image file used for ‘cond2Image’ is determined by the variable, ‘actionOnset’, like so:
if actionOnset >0 and actionOnset < 0.15: #0-14 letterClickedImage= nums0 letterClickedTime = '0' if cond == 2 or cond ==4: dummyLetter1= nums1 dummyLetter1Time = '0.15' dummyLetter2= nums2 dummyLetter2Time = '0.3' dummyLetter3= nums3 dummyLetter3Time = '0.45' dummyLetter4= nums4 dummyLetter4Time = '0.6' elif actionOnset > 0.14 and actionOnset < 0.3: #15-29 letterClickedImage= nums1 letterClickedTime = '0.15' if cond == 2 or cond ==4: dummyLetter1= nums0 dummyLetter1Time = '0' dummyLetter2= nums2 dummyLetter2Time = '0.3' dummyLetter3= nums3 dummyLetter3Time = '0.45' dummyLetter4= nums4 dummyLetter4Time = '0.6'
and so on…
So, actionOnset is basically the time that the participant makes a mouse click during the experiment. It is determined using this code:
if cond == 1 or cond == 2: if checkResp == 1: if timer.getTime() < trialEnd: if mouse.getPressed()==1: actionOnset = timer.getTime() tone.play() toneOnset = actionOnset + 0.25 tonePlayed=t checkResp=0 elif timer.getTime() > trialEnd: noResp=1 continueRoutine = False elif tonePlayed>0 and (t>(tonePlayed+trialEndGap)): noResp=0 continueRoutine = False
However, the error message suggests that actionOnset remains null (it’s set to null at the beginning of the routine) and hence, a mouse click is never registered.
What is going on here? How do I fix this?