Hi,
I recently installed PsychoPy and was able to make it work on Windows under Spyder. I tested it with a simple GratingStim code (see below the simple code).
However, while the first time the grating stimulus appears correclty, the second time i run the same code the window opens but no grating display appears.
Does anyone have any idea of what is going on?
Thanks
Gian luca
import sys
sys.path.append("C:\Program Files (x86)\PsychoPy2\Lib\site-packages\PsychoPy-1.84.2-py2.7.egg")
sys.path.append("C:\Program Files (x86)\PsychoPy2\Lib\site-packages")
# NOTE: I had to include the code above otherwise Spyder would not recognize the PsychoPy module
import psychopy.visual
import psychopy.event
win = psychopy.visual.Window(
size=[400, 400],
units="pix",
fullscr=False
)
grating = psychopy.visual.GratingStim(
win=win,
units="pix",
size=[150, 150]
)
grating.draw()
win.flip()
psychopy.event.waitKeys()
win.close()