psychopy.org | Reference | Downloads | Github

1.90.1 language localization locale

Win 10
PsychoPy 1.90.1

Hi all,
I’m trying to change language localization using Preferences>app and errors appear:

Traceback (most recent call last):
  File "E:\PsychoPy2\lib\site-packages\psychopy\app\preferencesDlg.py", line 246, in onOK
    self.onApply(event=event)
  File "E:\PsychoPy2\lib\site-packages\psychopy\app\preferencesDlg.py", line 238, in onApply
    self.setPrefsFromCtrls()
  File "E:\PsychoPy2\lib\site-packages\psychopy\app\preferencesDlg.py", line 361, in setPrefsFromCtrls
    self.app.prefs.saveUserPrefs()  # includes a validation
  File "E:\PsychoPy2\lib\site-packages\psychopy\preferences\preferences.py", line 185, in saveUserPrefs
    self.userPrefsCfg.write()
  File "E:\PsychoPy2\lib\site-packages\configobj.py", line 2070, in write
    out.extend(self.write(section=this_entry))
  File "E:\PsychoPy2\lib\site-packages\configobj.py", line 2076, in write
    comment))
  File "E:\PsychoPy2\lib\site-packages\configobj.py", line 1986, in _write_line
    val = self._decode_element(self._quote(this_entry))
  File "E:\PsychoPy2\lib\site-packages\configobj.py", line 1788, in _quote
    for val in value])
  File "E:\PsychoPy2\lib\site-packages\configobj.py", line 1812, in _quote
    raise ConfigObjError('Value "%s" cannot be safely quoted.' % value)
configobj.ConfigObjError: Value "Casque (@System32\drivers\bthhfenum.sys,#2;%1 Hands-Free%0
;(Bose AE2 SoundLink))" cannot be safely quoted.

[Quite strange that it tried to access my headphones (Bose AE2 SoundLink)]

The story behind this is that I can’t configure monitors neither in the monitor center nor through code.
I suspected a incongruence between native language localization and mine (French).

Any idea?

Alex

I experienced the same error. Newline characters in the name of audio device seems to cause this error. I’ve sent a pull request to fix this.

BF: Preference cannot be saved if newline character is included in the name of sound device