Hi! I really appreciate the work that you’ve put into PsychoPy!
I recently tried creating a new sound object from a string:
a = sound.Sound(value="A")
and was met with the following error trace:
“Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\mdm124\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py”, line 334, in init
self.setSound(value, secs=self.secs, octave=self.octave,
File “C:\Users\mdm124\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py”, line 423, in setSound
_SoundBase.setSound(self, value, secs, octave, hamming, log)
File “C:\Users\mdm124\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound_base.py”, line 192, in setSound
self._setSndFromNote(value.capitalize(), secs, octave,
File “C:\Users\mdm124\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound_base.py”, line 248, in _setSndFromNote
self._setSndFromFreq(thisFreq, secs, hamming=hamming)
File “C:\Users\mdm124\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound_base.py”, line 264, in _setSndFromFreq
self._setSndFromArray(outArr)
File “C:\Users\mdm124\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py”, line 497, in _setSndFromArray
self.track = audio.Slave(self.stream.handle, data=self.sndArr,
File “C:\Users\mdm124\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py”, line 609, in stream
label, s = streams.getStream(sampleRate=self.sampleRate,
TypeError: cannot unpack non-iterable NoneType object”
This seems to only be an issue with creating sounds from notes (.wav files work fine and sound great), and is not an issue on 2024v1.3 on Mac (need to check which OS).
Thanks,
Miles