'SoundPTB' object has no attribute 'isFinished'

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2023.1.2
Standard Standalone? (y/n) If not then what?: yes
What are you trying to achieve?: I want to play audio in my experiment : one first long stream (exposition phase), then shorter streams (trials, they change in a loop).

What did you try to make it work?: I have one routine with the long stream, and another one in a loop with a file owning all the short streams.

**What specifically went wrong when you tried that?:**Traceback (most recent call last):
the long stream works, but the short stream happen juste one time, then every thing stops and this message appear :
File “C:\Users\ACER EXTENSA\Documents\neurosciences\stage\S_peperkamp\adultes\library\essai_lastrun.py”, line 337, in
elif sound_1.isFinished:
AttributeError: ‘SoundPTB’ object has no attribute ‘isFinished’
################ Experiment ended with exit code 1 [pid:14700] #################

I have read this was a bug in the 2023.1.2 version, so i have tried to update the version, and this message appeared :

File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\connections\updates.py”, line 406, in onInstall
info = self.doAutoInstall()
File “C:\Program Files\PsychoPy\lib\site-packages\psychopy\app\connections\updates.py”, line 554, in doAutoInstall
v = self.latest[‘version’]
TypeError: ‘int’ object is not subscriptable

I have tried as well to download the 2023.1.3 version, but there is no .exe file in the zip, I don’t know how to use this

can someone give me some advise?

Thanks!!!

Hello,
Instead of using version 2023.x.x, use the previous stable version, 2022.2.5:

Because of this exact bug, I have 2 versions of PsychoPy on my computer.

Let me know if it works for you,
Chen

Thank you !

  • first, thanks to you, I have realized I didn’t use the right link to install 2023.1.3, I achieved installing this version. Anyway, this version didn’t work either, although I have read it should work.
  • I have thus tried your version, it works! thank you very much!

Perfect, no problem!

Chen

This has been solved here : AttributeError: 'SoundPTB' object has no attribute 'isFinished' ¡ Issue #5537 ¡ psychopy/psychopy ¡ GitHub

You can temporarly copy the provided file here : C:\Program Files\PsychoPy\Lib\site-packages\psychopy\sound\

backend_ptb.py (24.8 KB)

Hi, forgive my ignorance! I think this might be a solution to my similar issue here:

However, I can’t seem to find the folder location C:\Program Files\PsychoPy\Lib\site-packages\psychopy\sound.

Psychopy seems to be installed to this folder, but there is no Lib folder in that location (or any other folder)

C:\Users____\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\PsychoPy-2023.1.2

any idea how can we fix it for mac installation. Where can I find this path in mac and replace the file with the one available here?

1 Like

I have the same problem with the audio failure and have been confused for several days. I just tried your version and it did work! Thank you sooooo much!!

1 Like

Another solution is to set the Use PsychoPy version to 2022.2.5 in the settings: