Hi all,
I may have come across a series of inter-connected bugs to do with the specification of audio libraries. In the hardware prefs, if the first in the list of audio libraries is:
- ‘pyo’, then I get the “IndexError: list index out of range” error reported below, that others also reported, although their problem was not followed through to a solution;
- ‘sounddevice’, then I get inaccurate sound delivery, as described in problem #3 that I reported here a while ago - again, no luck with replies;
- ‘PTB’, then there is no sound coming through the speakers when the stimuli are played back in the experiment
The list of preferences for the audio drivers on the other hand appear in my testing to make no difference.
I have an on-board Realtek soundcard (Lenovo laptop) that otherwise works fine. With the exception of the second point above, I’ve not had these problems in the previous (pre 2020) versions of psychopy, thus I imagine this is related to the changes in the recent 2020.1.3 version. Restarting PsychoPy/Windows, and even reinstalling PsychoPy, appears to not help with this.
Would anyone be able to help? Many thanks in advance!
Tudor
The error message in full:
Traceback (most recent call last):
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\_psychopyApp.py", line 770, in showPrefs
from psychopy.app.preferencesDlg import PreferencesDlg
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\app\preferencesDlg.py", line 21, in <module>
from psychopy import sound
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\__init__.py", line 157, in <module>
elif dev not in backend.getDevices(kind='output'):
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_pyo.py", line 135, in getDevices
inputs, outputs = get_devices_infos()
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_pyo.py", line 93, in get_devices_infos
devices = _query_devices()
File "C:\Program Files\PsychoPy3\lib\site-packages\psychopy\sound\backend_pyo.py", line 86, in _query_devices
info[v.strip().split(": ")[0]] = v.strip().split(": ")[1]
IndexError: list index out of range
29.8546 INFO sound is using audioLib: pyo
29.8547 WARNING We strongly recommend you activate the PTB sound engine in PsychoPy prefs as the preferred audio engine. Its timing is vastly superior. Your prefs are currently set to use ['pyo', 'pygame', 'sounddevice'] (in that order).
OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): 2020.1.3