Skip to content

Instantly share code, notes, and snippets.

@krootca
Last active April 22, 2024 17:02
Show Gist options
  • Save krootca/b906a58fff59737d26565b410e89b671 to your computer and use it in GitHub Desktop.
Save krootca/b906a58fff59737d26565b410e89b671 to your computer and use it in GitHub Desktop.
Fix error - Kazam - Failed to correctly detect operating system.

Kazam Error:

WARNING Kazam - Failed to correctly detect operating system.
Traceback (most recent call last):
  File "/usr/bin/kazam", line 148, in <module>
    from kazam.app import KazamApp
  File "/usr/lib/python3/dist-packages/kazam/app.py", line 35, in <module>
    from kazam.backend.prefs import *
  File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 478, in <module>
    prefs = Prefs()
  File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 121, in __init__
    self.read_config()
  File "/usr/lib/python3/dist-packages/kazam/backend/prefs.py", line 199, in read_config
    self.audio_source = int(self.config.get("main", "audio_source"))
  File "/usr/lib/python3/dist-packages/kazam/backend/config.py", line 106, in get
    self.set(section, key, default)
  File "/usr/lib/python3/dist-packages/kazam/backend/config.py", line 125, in set
    super().set(section, option, str(value))
  File "/usr/lib/python3.9/configparser.py", line 1204, in set
    super().set(section, option, value)
  File "/usr/lib/python3.9/configparser.py", line 902, in set
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'main'

Fix: Arreglo:


sudo gedit /usr/lib/python3.9/configparser.py

Y cambia la función set() para ### linea 891 And change the function set() to ### line 891

  def set(self, section, option, value=None):
        """Set an option."""
        if value:
            value = self._interpolation.before_set(self, section, option,
                                                   value)
        if not section or section == self.default_section:
            sectdict = self._defaults
        else:
            try:
                sectdict = self._sections[section]
            except KeyError:
                #raise NoSectionError(section) from None #this is the error
                True
        #sectdict[self.optionxform(option)] = value # this is other error

Esto: This:

                #raise NoSectionError(section) from None #this is the error
                True
        #sectdict[self.optionxform(option)] = value # this is other error

El error es causado por la configuración de sonido, y la unica forma de hacer una captura de pantalla es cambiando el codigo fuente el programa. The error is caused by the sound settings, and the only way to take a screenshot is to change the source code of the program.

¿Como arreglo el problema de sonido?

¿How do I fix the sound problem?

@1kazuza
Copy link

1kazuza commented Apr 22, 2024

It works for me! Thanks! Gracias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment