Psychopy version: PsychoPy (1.85.3)
OS: OS X Yosemite (10.10.5)
Coder View
I was struggling to get MovieStim3 to work in my own script, even though it worked in the Demo (MovieStim.py). Here is the error I was getting:
Traceback (most recent call last):
File “/Users/vassiki/Desktop/CMID/presentation/video_pres.py”, line 228, in
clip_video.draw()
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/movie3.py”, line 417, in draw
GL.glPopAttrib()
File “/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/pyglet/gl/lib.py”, line 104, in errcheck
raise GLException(msg)
pyglet.gl.lib.GLException: stack underflow
I was able to get my script to work by simply changing the order in which I imported modules from psychopy.
This was the original (non-functional) order:
from psychopy import locale_setup, core, event, gui, logging, visual, sound
And this was the one that worked:
from psychopy import visual, core, event, gui, logging, sound
The output from psychopy.prefs was the same in both cases (importantly, the window type used pyglet). Even though this issue is solved for me personally, I don’t fully understand why the order of loading modules mattered. It would be wonderful to have some clarification for the future.
Thanks!