OS (e.g. Win10): Windows 10
PsychoPy version (e.g. 1.84.x): 2022.2.4
Standard Standalone? (y/n) If not then what?: y
What are you trying to achieve?: I have an experiment file that requires sound files. It’s a version of an experiment that I’ve run successfully on my personal and office Macs (and on pavlovia, in previous iterations), but is NOT running on my lab computers. It doesn’t seem to be able to load sound files, but I’m not exactly sure how to read the error messages.
What did you try to make it work?: changing the order of the sound drivers in psychopy preferences (ptb is what the experiment calls for and it’s in the list) and seeing the preferences in the other experiments that DO work on the lab computers (everything seems to be the same?)
What specifically went wrong when you tried that?:
Include pasted full error message if possible. “That didn’t work” is not enough information.
207.8668 INFO Loaded monitor calibration from ['2019_10_01 07:46']
Generating PsychoPy script...
Alert 4405: Editable textbox component textbox and keyboard component key_resp_2 in the same routine may compete for keypresses
For more info see https://docs.psychopy.org/alerts/4405.htmlAlert 4405: Editable textbox component patResp and keyboard component endpatResp in the same routine may compete for keypresses
For more info see https://docs.psychopy.org/alerts/4405.htmlAlert 4405: Editable textbox component testResp and keyboard component key_resp_5 in the same routine may compete for keypresses
For more info see https://docs.psychopy.org/alerts/4405.html####### Running: C:\Users\SPPLab\Desktop\Shiloh_Sleep\NoSleep_lastrun.py #######
519.4837 INFO Loaded monitor calibration from ['2019_10_01 07:46']
pygame 2.1.0 (SDL 2.0.16, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
PTB-ERROR: Desired audio parameters for device -1 unsupported by audio device: Invalid sample rate
Traceback (most recent call last):
PTB-ERROR: Seems the requested audio sample rate 22050.000000 Hz is not supported by this combo of hardware and sound driver.
Error in function Open: Usage error
Failed to open PortAudio audio device due to unsupported combination of audio parameters.
PsychPortAudio:Open: Usage:
pahandle = PsychPortAudio('Open' [, deviceid][, mode][, reqlatencyclass][, freq][, channels][, buffersize][, suggestedLatency][, selectchannels][, specialFlags=0]);
PTB-ERROR: Desired audio parameters for device -1 unsupported by audio device: Invalid sample rate
PTB-ERROR: Seems the requested audio sample rate 22050.000000 Hz is not supported by this combo of hardware and sound driver.
Error in function Open: Usage error
Failed to open PortAudio audio device due to unsupported combination of audio parameters.
PsychPortAudio:Open: Usage:
pahandle = PsychPortAudio('Open' [, deviceid][, mode][, reqlatencyclass][, freq][, channels][, buffersize][, suggestedLatency][, selectchannels][, specialFlags=0]);
9.3409 WARNING User requested fullscreen with size [2560 1440], but screen is actually [1920, 1080]. Using actual size
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 226, in __init__
audio.Stream.__init__(self, device_id=deviceID, mode=mode+8,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychtoolbox\audio.py", line 97, in __init__
self.handle = PsychPortAudio('Open', device_id, mode,
Exception: Failed to open PortAudio audio device due to unsupported combination of audio parameters.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\SPPLab\Desktop\Shiloh_Sleep\NoSleep_lastrun.py", line 110, in <module>
test_sound = sound.Sound('ALL_059_M_ENG_ENG_HT1.wav', secs=-1, stereo=True, hamming=True,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 331, in __init__
self.setSound(value, secs=self.secs, octave=self.octave,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 426, in setSound
_SoundBase.setSound(self, value, secs, octave, hamming, log)
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\_base.py", line 200, in setSound
self._setSndFromFile(p)
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 459, in _setSndFromFile
self._setSndFromArray(sndArr)
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 498, in _setSndFromArray
self.track = audio.Slave(self.stream.handle, data=self.sndArr,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 578, in stream
label, s = streams.getStream(sampleRate=self.sampleRate,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 139, in getStream
return self._getStream(sampleRate,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 186, in _getStream
self[label] = _MasterStream(sampleRate, channels, blockSize,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychopy\sound\backend_ptb.py", line 247, in __init__
audio.Stream.__init__(self, mode=mode+8,
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychtoolbox\audio.py", line 97, in __init__
self.handle = PsychPortAudio('Open', device_id, mode,
Exception: Failed to open PortAudio audio device due to unsupported combination of audio parameters.
Exception ignored in: <function Stream.__del__ at 0x0000025D3B229820>
0.8795 WARNING Monitor specification not found. Creating a temporary one...
Traceback (most recent call last):
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychtoolbox\audio.py", line 236, in __del__
self.close()
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychtoolbox\audio.py", line 146, in close
raise err
File "C:\Users\SPPLab\AppData\Local\Programs\PsychoPy\lib\site-packages\psychtoolbox\audio.py", line 139, in close
PsychPortAudio('Close', self.handle)
AttributeError: '_MasterStream' object has no attribute 'handle'
################# Experiment ended with exit code 1 [pid:5220] #################
534.0666 INFO Loaded monitor calibration from ['2019_10_01 07:46']