[SOLVED] My mistake; mucked up python - KAZAM

I wanted to fix Kazam (doesnt save preset directories) there were a bunch of dependency issues that I tried to sort to allow compilation, but in so doing, managed to stop Kazam from working entirely :frowning:

My guess is I’ll have to reinstall Budgie, but before doing so, if anyone has any idea how to sort it, appreciate. Kazam seems the only (vital) app thats effected.

alistair@alsE590:~$ kazam
/usr/bin/kazam:77: DeprecationWarning: dist() and linux_distribution() functions are deprecated in Python 3.5
  dist = platform.linux_distribution()
/usr/local/lib/python3.7/dist-packages/kazam/backend/webcam.py:24: PyGIWarning: GUdev was imported without specifying a version first. Use gi.require_version('GUdev', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GObject, GUdev
Traceback (most recent call last):
  File "/usr/bin/kazam", line 148, in <module>
    from kazam.app import KazamApp
  File "/usr/local/lib/python3.7/dist-packages/kazam/app.py", line 36, in <module>
    from kazam.backend.prefs import *
  File "/usr/local/lib/python3.7/dist-packages/kazam/backend/prefs.py", line 566, in <module>
    prefs = Prefs()
  File "/usr/local/lib/python3.7/dist-packages/kazam/backend/prefs.py", line 142, in __init__
    self.config = KazamConfig()
  File "/usr/local/lib/python3.7/dist-packages/kazam/backend/config.py", line 87, in __init__
    ConfigParser.__init__(self, self.DEFAULTS[0]['keys'])
  File "/usr/lib/python3.7/configparser.py", line 638, in __init__
    self._read_defaults(defaults)
  File "/usr/lib/python3.7/configparser.py", line 1216, in _read_defaults
    self.read_dict({self.default_section: defaults})
  File "/usr/lib/python3.7/configparser.py", line 753, in read_dict
    self.set(section, key, value)
  File "/usr/local/lib/python3.7/dist-packages/kazam/backend/config.py", line 149, in set
    self.add_section(section)
  File "/usr/lib/python3.7/configparser.py", line 1205, in add_section
    super().add_section(section)
  File "/usr/lib/python3.7/configparser.py", line 655, in add_section
    raise ValueError('Invalid section name: %r' % section)
ValueError: Invalid section name: 'DEFAULT'

You seem to have installed some python stuff into /usr/local

This is rarely used in ubuntu and certainly not for debian packages.

I would delete everything under /usr/local, logout and login again.

You should be able to restore the debian package version of Kazam via something like

sudo apt install --reinstall kazam
1 Like

You are a lifesaver.
I removed the stuff under local which included a runtime Kazam, didnt need to logout, or reinstall - Kazam just worked. Thanks kindly, Al.

1 Like