psychopy.org | Reference | Downloads | Github

AttributeError: ‘NoneType’ object has no attribute ‘out’


#1

Hi,
we built an experiment in PsychoPy which wonderfully worked at several of our computers.
The experiment plays soundfiles while at the same time shows numbers at the screen.

Now we want to repeat the experiment in another city.
We installed exactly the same version of psychoPy (1.82.01), used exactly the same file of the experiment as before, and the experiment crashes with this error message:

Pyo version 0.8.0 (uses single precision)
Portaudio error in PA_AbortStream: Wait timed out

Traceback (most recent call last):
File “C:\Users (…)  test_programm_lastrun.py”, line 669, in <module>

backgroundMusic.play()

File “C:\Program Files\PsychoPy2\lib\site-packages\psychopy-1.84.1-py2.7.egg\psychopy\sound.py”, line 724, in play

self._snd.out()

AttributeError: ‘NoneType’ object has no attribute ‘out’

We’ve tried this on several computers with different OS and different sound cards, we’ve tried it with an external sound card, we’ve changed the settings to the init function in sound.py (a larger buffer size and a rate of 22050 instead of 44100), we’ve checked the Audio Library Settings (File -> Preferences -> General -> audio library: [u’pyo’, u’pygame’]).

What else could we try to make it run?

Thanks in advance!


#2

Hi, this doesn’t solve your problem, but: you state that you’re using PsychoPy 1.82.01, but the log file says you’re running 1.84.1. So, which version are you using? :slight_smile:


#3

I wonder how self._snd became None. It looks like no sound is set. Is the path to the sound file different between the computers so that on one computer it points to a non-existing path?

Even if that is the case, it would still be a bug since an invalid path should raise an error.


#4

Hi Richard,
thanks for your post. Actually this did solve our problem… We installed the older version again (which we already did before…?!) and now it works. So thank you very much for the hint! :slight_smile:


#5

Hi lindeloev,
we checked that, too. The path was right and existing. It pointed always into the same folder where the program was installed.


#6

That’s great, happy to hear that :slight_smile:


#7

Yes, happy too! :relaxed:


#8

Hi, I think I am having the same problem…I have version v1.90.0 installed, but in the log file it says the following:

pyo version 0.8.7 (uses single precision)
Traceback (most recent call last):
File “C:\Users(…)experiment_lastrun.py”, line 401, in
sound_8.play() # start the sound (it finishes automatically)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\sound\backend_pyo.py”, line 379, in play
self._snd.out()
AttributeError: ‘NoneType’ object has no attribute ‘out’

Do you think this is the same issue? If so, which version should I try installing?

A point in the right direction would be great!

Thank you in advance!