Hi,
I’m trying to add 2nd monitor output to a working builder based desktop experiment, so that the experimenter can see what’s going on. This is not mirroring, as the information should not be seen by the subject.
I’m trying to do this through adding code blocks, to a component (created through the builder) that lasts 5 seconds. The experiment should then proceed on to other components, before returning to this section, displaying information about the next trial.
Begin Experiment
# create window and text object
otherWin = visual.Window(size=[1920, 1080], pos=[0, 0], screen=1, units='norm', waitBlanking=False, allowGUI=False, fullscr = True)
myText = visual.TextStim(otherWin, text="PlaceHolder", pos=(0,0), units='norm', color='white', autoDraw=False)
myText.size = 0.09
Begin routine:
# create message for secondary display
otherMsg="Stimulus#" + str(stimNum) + " Temp = " + str(level) + "\nNumber of reversals = " + str(RevCounter)
myText.setText(text=otherMsg)
myText.setAutoDraw(True)
Each Frame:
# show message on Experimenter display
otherWin.flip()
The message displays on the second monitor, but at the end of the 5 seconds the program crashes with the following message:
1.1059 WARNING Monitor specification not found. Creating a temporary one...
File "C:\Users\NAME\PsychoPy\Adaptive_Staircase_updated\ASP_lastrun.py", line 1570, in <module>
thisComponent.tStart = None
AttributeError: 'str' object has no attribute 'tStart'
2.1559 WARNING Monitor specification not found. Creating a temporary one...
################ Experiment ended with exit code 1 [pid:10664] #################
Not sure what I’m missing…
Any help/suggestions would be much appreciated.
Best wishes,
Jon