| 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\”, line 6, in
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\”, line 1146, in switchOn
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\sound\”, line 132, in init
audioDriver, outputID = _bestDriver(devNames, devIDs)
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\psychopy\sound\”, line 27, in _bestDriver
preferredDrivers = prefs.general[‘audioDriver’]
File “C:\Program Files (x86)\PsychoPy2\lib\site-packages\”, 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

mike = microphone.AdvAudioCapture()

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