| Reference | Downloads | Github

Audio files during looping is giving an error

I’m using psychopy version 1.84.2 and I’m a beginner.
I am creating a stimulus wherein I repeat the set of audio files in random order using looping.
However when I run, I’m getting the following error message:

trialList=data.importConditions(u'sounds.xlsx', selection=sound),
  File "C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy-1.84.2-py2.7.egg\psychopy\", line 2718, in importConditions
    elif len(selection) > 0:
TypeError: object of type 'module' has no len()

Thank you!

Are you usig a variable called sound to try and select rows? Use a different name for that variable: you’ve also got a module called sound and they’re clashing

Yes, I’m using a variable called sound to select audio files. I’ve tried using a different one and it worked.

Thank you!