Hello,
An RA has been running a new experiment for me, and is randomly (approximately 1 in 6 times) obtaining the following (or similar) error messages upon presentation of the first trial:
pyo version 0.8.0 (uses single precision)
Traceback (most recent call last):
File "C:\Users\tutor\Desktop\username\B1709\B1709D_2.py", line 499, in <module>
win.flip()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\window.py", line 568, in flip
thisStim.draw()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\shape.py", line 289, in draw
vertsPix = self.verticesPix
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\basevisual.py", line 467, in verticesPix
self._updateVertices()
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\visual\basevisual.py", line 502, in _updateVertices
win=self.win, units=self.units)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\tools\monitorunittools.py", line 82, in convertToPix
return unit2pixFunc(vertices, pos, win)
File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\tools\monitorunittools.py", line 22, in _pix2pix
return pos + vertices
ValueError: operands could not be broadcast together with shapes (8711696,) (32,2)
The error is always occurring on a “win.flip()” command, but not always with the same stimulus (sometimes it’s at the point where the fixation cross is presented, sometimes it’s an array of memory stimuli, and sometimes it’s presentation of a test item). Based on the content of the error messages, and some stumbling around I have done in monitorunittools.py, I’m assuming the problem lies in a conversion of some value to pixels, but I haven’t been able to figure out why or how to fix it. Has anyone come across a similar problem before? If so, did you find a solution? Or do you have any suggestions for how I might be able to find the source of the problem?
Some relevant details:
- When the error doesn’t appear (i.e., on the other 5 out of 6 occasions), the experiment runs perfectly
- The PsychoPy version that the program is running under is 1.84.2, on Windows (10, I think)
- The monitor display resolution is 1920*1080, and the experiment is running full-screen
- The stimuli I’m displaying aren’t anything out of the ordinary. For instance, the fixation stimulus is specified as
fixation = visual.TextStim(win=win, ori=0, name='fixation', text='+', font='Arial', units='pix', pos=[0,0], height=25, wrapWidth=None, color=[-1,-1,-1], colorSpace='rgb', opacity=1, depth=0.0)
The other stimuli that have been giving me problems are visual.Circle stimuli, with positions and sizes specified in pixels. - This has been happening on multiple identical lab computers.
- I have run plenty of similar experiments in PsychoPy before (and a few on these computers/with these monitors), and have never had this problem previously.
- My RA had our IT group update PsychoPy to 1.85.2 while I was away last week, but then had them re-install the older version again due to problems with recording audio (for which I see there is a solution in another thread). I am wondering whether a part of this updating/re-installing process has broken something.
Thanks in advance for any help you are able to give.