Comment 3 for bug 1201126

Revision history for this message
Daniel Manrique (roadmr) wrote :

The common factor seems to be that affected systems are using a non-english locale. Thus, our regex doesn't match. Here's sample pactl stat output from a system with spanish locale:

Actualmente en uso: 1 bloques conteniendo 63,9 KiB bytes en total.
Ubicados durante a lo largo del tiempo: 14093 bloques conteniendo 17,0 MiB bytes en total.
Tamaño del cache de muestra: 0 B
Cadena de servidor: /run/user/1000/pulse/native
Versión de protocolo de biblioteca: 28
Versión de protocolo de servidor: 28
Es local: yes
Índice de clientes: 146
Tamaño de tesela: 65472
Nombre de usuario: ubuntu
Nombre de anfitrión: 201103-7376
Nombre de servidor: pulseaudio
Versión de servidor: 4.0
Especificación de muestro predeterminado: s16le 2ch 44100Hz
Mapa de canales predeterminado: front-left,front-right
Destino predeterminado: alsa_output.pci-0000_00_1b.0.analog-stereo
Fuente predeterminada: alsa_input.pci-0000_00_1b.0.analog-stereo
Cookie: c2d5:230a

"Destino predeterminado" is the translated version of "Default Sink". The regex doesn't match:

default_pattern = "(?<=Default %s: ).*"

Thus, line 213 of the script produces the failure:

        default = default_regex.search(pactl_status).group()

We're not checking that default_regex.search suceeded (we just blindly assume it did).

There seems to be some code meant to ensure we always use a default (C) locale (see function unlocalized_env), but it doesn't seem to be working as expected. Work to do: see why this function is failing, and fix it.

In the meanwhile, steps to reproduce:
sudo apt-get install language-pack-es language-pack-gnome-es # feel free to replace for a language you understand
LANG=es_ES.UTF-8 LANGUAGE=es_ES //usr/share/checkbox/scripts/audio_settings store --file=/tmp/cache