Hello, everyone,
I’m starting with psychopy 3 for the first time so maybe my question is too basic but I’ve been trying to solve it all week and I haven’t been able to.
My goal is to create an experiment where images appear with a certain time interval between them. All the images are in a folder. Here is my script:
from psychopy import core, visual
import os
#window
myWin = visual.Window([1280,720], monitor="testMonitor")
folderPath = 'C:\\Users\\Tony\\Pictures\\PRACTICO\\positivas\\'
test_images = []
for file in os.listdir(folderPath):
if file.lower().endswith(".jpg"):
test_images.append(file)
for i in range (5): #I put the number 5 because there are 5 images in the folder
stimulus = folderPath + test_images[i]
stim= visual.ImageStim(myWin, image=stimulus)
stim.draw([myWin])
myWin.flip()
core.wait(05.0)
When i try to run this i get the follow error:
win._setCurrent()
AttributeError: ‘list’ object has no attribute '_setCurrent’
What am i doing wrong? I really appreciate everyone’s help