I am new to psychopy and I have written a small piece of code to display
fixation point. Everything works fine, if I do not set the option
"stereo=True". But the moment I set “stereo=True”, it fails with exception “pyglet.window.NoSuchConfigException”.
There is no issue if I set “stereo = False” or I do not pass this parameter at all.
I had posted this question on stackoverflow and I got a suggestion to use winType = ‘pygame’ rather than 'pyglet’
What is the issue with using pyglet and is there something else that needs to be done before passing this parameter?
I have no preference for pygame or pyglet but curious to know why is does not work on pyglet.
I need to use this to supports quad buffers and any help is appreciated!!
Here is the exception:
Traceback (most recent call last): File “fixiation.py”, line 3, in
win = visual.Window([1920, 1080], screen=1, units=‘pix’, fullscr=True, stereo=True)#monitor=‘DVI-I-1’, units=‘pix’,
fullscr=True) File
"/usr/lib/python2.7/dist-packages/psychopy/visual/window.py", line
325, in init
self._setupGL() File “/usr/lib/python2.7/dist-packages/psychopy/visual/window.py”, line
1425, in _setupGL
self._setupPyglet() File “/usr/lib/python2.7/dist-packages/psychopy/visual/window.py”, line
1286, in _setupPyglet
style=style) File “/usr/lib/pymodules/python2.7/pyglet/window/xlib/init.py”, line
474, in init
super(XlibWindow, self).init(*args, kwargs)
File “/usr/lib/pymodules/python2.7/pyglet/window/init.py”, line
645, in
init
config = screen.get_best_config(config) File
"/usr/lib/pymodules/python2.7/pyglet/window/init.py", line 291, in
get_best_config
raise NoSuchConfigException()
**pyglet.window.NoSuchConfigException Exception AttributeError:
"‘Window’ object has no attribute ‘useNativeGamma’" in > ignored
Here is the sample code
from psychopy import visual, event
win = visual.Window([1920, 1080], screen=1, units=‘pix’, fullscr=True, stereo=True)
fixation = visual.GratingStim(win=win, size=10, pos=[0,0], sf=0, units=‘pix’)
while True:
fixation.draw()
win.update()
if len(event.getKeys()) >0:
break
event.clearEvents()
win.close()