psychopy.org | Reference | Downloads | Github

UnicodeDecodeError occurs whenever I use pyo

I’m having a problem using pyo. (I can use pygame fine, but I need pyo as the experiment involves microphone input.) Whenever I use pyo, this error message comes up:

pyo version 0.8.7 (uses single precision)
Traceback (most recent call last):
File “C:\Users\User\Documents\untitled.py”, line 6, in
microphone.switchOn()
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\microphone.py”, line 1146, in switchOn
sound.init(rate=sampleRate)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\sound\backend_pyo.py”, line 132, in init
audioDriver, outputID = _bestDriver(devNames, devIDs)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\sound\backend_pyo.py”, line 27, in _bestDriver
preferredDrivers = prefs.general[‘audioDriver’]
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\configobj.py”, line 563, in getitem
new = [_check(entry) for entry in val]
UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0xef in position 24: invalid continuation byte
()

This code is sufficient to generate the error:

from psychopy import prefs
prefs.general[‘audioLib’] = [‘pyo’]

from psychopy import core, microphone, sound

microphone.switchOn()
mike = microphone.AdvAudioCapture()
mike.record(10)

How can this be resolved? I am using v1.85.6 on Windows 10. Thanks!