OS Win10:
PsychoPy version 2023.2.1:
*Standard Standalone
What are you trying to achieve?:
Screen images from a specific folder, one at a time for a BDM auction.
Here is the code:
**before exp:**
from numpy.random import choice
image_list = list(choice(40, 40, replace = False))
idx = 0
**begin routine:**
import glob
curr_image = glob.glob("BDM Database/*")[image_list[idx]]
thisExp.addData('image', curr_image.split('/')[-1])
idx += 1
Here is the error:
File "C:\Users\Adi\OneDrive - mail.tau.ac.il\\u05de\u05e1\u05de\u05db\u05d9\u05dd\\u05ea\u05d5\u05d0\u05e8 \u05e9\u05e0\u05d9\CAT Memory\BDM_lastrun.py", line 1091, in <module>
run(
File "C:\Users\Adi\OneDri5de\u05db\u05d9\u05dd\\u05ea\u05d5\u05d0\u05e8 \u05e9\u05e0\u05d9\CAT Memory\BDM_lastrun.py", line 760, in run
curr_image = glob.glob("BDM Database/*")[image_list[idx]]
IndexError: list index out of range
################ Experiment ended with exit code 1 [pid:26580] #################
157.1598 INFO Loaded monitor calibration from ['2023_09_05 16:25']ve - mail.tau.ac.il\\u05de\u05e1\u0
Thanks ahead