Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kazam not starting #77

Open
TheBallOfAeolus opened this issue May 19, 2022 · 4 comments
Open

Kazam not starting #77

TheBallOfAeolus opened this issue May 19, 2022 · 4 comments

Comments

@TheBallOfAeolus
Copy link

I am using Fedora release 35 and when I try to run Kazam I am getting the following:

$ kazam --debug
/usr/local/bin/kazam:32: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
WARNING Kazam - Failed to correctly detect operating system.
DEBUG Kazam - Starting ...
DEBUG Kazam - Running on: Ubuntu 12.10
DEBUG Kazam - Kazam version: 1.4.5 NCC-80102
DEBUG Kazam - Starting new instance ...
Traceback (most recent call last):
  File "/usr/local/bin/kazam", line 146, in <module>
    from kazam.app import KazamApp
  File "/usr/local/lib/python3.10/site-packages/kazam/app.py", line 35, in <module>
    from kazam.backend.prefs import *
  File "/usr/local/lib/python3.10/site-packages/kazam/backend/prefs.py", line 462, in <module>
    Gdk.CursorType.TOP_LEFT_CORNER,
  File "/usr/lib/python3.10/site-packages/gi/overrides/__init__.py", line 32, in __getattr__
    return getattr(self._introspection_module, name)
  File "/usr/lib64/python3.10/site-packages/gi/module.py", line 126, in __getattr__
    raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.Gdk' object has no attribute 'CursorType'

As additional information the installation logs were:

$ sudo python3 setup.py install
/home/TheUser/dev/kazam-1.4.5/setup.py:7: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.core import setup
running install
running build
running build_py
running build_scripts
running build_i18n
intltool-update -p -g kazam
running build_icons
running build_help
running install_lib
creating /usr/local/lib/python3.10/site-packages/kazam
copying build/lib/kazam/version.py -> /usr/local/lib/python3.10/site-packages/kazam
copying build/lib/kazam/__init__.py -> /usr/local/lib/python3.10/site-packages/kazam
copying build/lib/kazam/utils.py -> /usr/local/lib/python3.10/site-packages/kazam
copying build/lib/kazam/instant.py -> /usr/local/lib/python3.10/site-packages/kazam
copying build/lib/kazam/app.py -> /usr/local/lib/python3.10/site-packages/kazam
creating /usr/local/lib/python3.10/site-packages/kazam/pulseaudio
copying build/lib/kazam/pulseaudio/ctypes_pulseaudio.py -> /usr/local/lib/python3.10/site-packages/kazam/pulseaudio
copying build/lib/kazam/pulseaudio/error_handling.py -> /usr/local/lib/python3.10/site-packages/kazam/pulseaudio
copying build/lib/kazam/pulseaudio/__init__.py -> /usr/local/lib/python3.10/site-packages/kazam/pulseaudio
copying build/lib/kazam/pulseaudio/pulseaudio.py -> /usr/local/lib/python3.10/site-packages/kazam/pulseaudio
creating /usr/local/lib/python3.10/site-packages/kazam/backend
copying build/lib/kazam/backend/prefs.py -> /usr/local/lib/python3.10/site-packages/kazam/backend
copying build/lib/kazam/backend/gstreamer.py -> /usr/local/lib/python3.10/site-packages/kazam/backend
copying build/lib/kazam/backend/config.py -> /usr/local/lib/python3.10/site-packages/kazam/backend
copying build/lib/kazam/backend/__init__.py -> /usr/local/lib/python3.10/site-packages/kazam/backend
copying build/lib/kazam/backend/grabber.py -> /usr/local/lib/python3.10/site-packages/kazam/backend
creating /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/about_dialog.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/window_select.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/indicator.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/window_area.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/window_countdown.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/__init__.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/preferences.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/done_recording.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/window_outline.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/main_menu.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/save_dialog.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/widgets.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
copying build/lib/kazam/frontend/combobox.py -> /usr/local/lib/python3.10/site-packages/kazam/frontend
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/version.py to version.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/utils.py to utils.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/instant.py to instant.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/app.py to app.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/pulseaudio/ctypes_pulseaudio.py to ctypes_pulseaudio.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/pulseaudio/error_handling.py to error_handling.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/pulseaudio/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/pulseaudio/pulseaudio.py to pulseaudio.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/backend/prefs.py to prefs.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/backend/gstreamer.py to gstreamer.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/backend/config.py to config.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/backend/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/backend/grabber.py to grabber.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/about_dialog.py to about_dialog.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/window_select.py to window_select.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/indicator.py to indicator.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/window_area.py to window_area.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/window_countdown.py to window_countdown.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/preferences.py to preferences.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/done_recording.py to done_recording.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/window_outline.py to window_outline.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/main_menu.py to main_menu.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/save_dialog.py to save_dialog.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/widgets.py to widgets.cpython-310.pyc
byte-compiling /usr/local/lib/python3.10/site-packages/kazam/frontend/combobox.py to combobox.cpython-310.pyc
running install_scripts
copying build/scripts-3.10/kazam -> /usr/local/bin
changing mode of /usr/local/bin/kazam to 755
running install_data
creating /usr/local/share/kazam
creating /usr/local/share/kazam/ui
copying data/ui/preferences.ui -> /usr/local/share/kazam/ui/
copying data/ui/kazam.ui -> /usr/local/share/kazam/ui/
creating /usr/local/share/kazam/icons
creating /usr/local/share/kazam/icons/counter
copying data/icons/counter/cb-4.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-8.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-10.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-3.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-5.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-9.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-6.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-1.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-7.png -> /usr/local/share/kazam/icons/counter/
copying data/icons/counter/cb-2.png -> /usr/local/share/kazam/icons/counter/
creating /usr/local/share/kazam/sounds
copying data/sounds/Canon 7D.ogg -> /usr/local/share/kazam/sounds/
copying data/sounds/Nikon D80.ogg -> /usr/local/share/kazam/sounds/
running install_egg_info
Removing /usr/local/lib/python3.10/site-packages/kazam-1.4.5-py3.10.egg-info
Writing /usr/local/lib/python3.10/site-packages/kazam-1.4.5-py3.10.egg-info

Any suggestion is welcome! :)

@niknah
Copy link

niknah commented May 19, 2022

Try the fix / alternatives here https://forums.gentoo.org/viewtopic-t-1136739.html

@TheBallOfAeolus
Copy link
Author

Thank you @niknah
I did what it was commented in the Gentoo forum, changing line 32 in /usr/local/bin/kazam from

from gi.repository import Gtk	

to

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk	

it actually solved the PyGIWarning problem, but I am still getting "WARNING Kazam - Failed to correctly detect operating system."

$ kazam --debug
WARNING Kazam - Failed to correctly detect operating system.
DEBUG Kazam - Starting ...
DEBUG Kazam - Running on: Ubuntu 12.10
DEBUG Kazam - Kazam version: 1.4.5 NCC-80102
DEBUG Kazam - Starting new instance ...
Traceback (most recent call last):
  File "/usr/local/bin/kazam", line 150, in <module>
    from kazam.app import KazamApp
  File "/usr/local/lib/python3.10/site-packages/kazam/app.py", line 35, in <module>
    from kazam.backend.prefs import *
  File "/usr/local/lib/python3.10/site-packages/kazam/backend/prefs.py", line 478, in <module>
    prefs = Prefs()
  File "/usr/local/lib/python3.10/site-packages/kazam/backend/prefs.py", line 119, in __init__
    self.config = KazamConfig()
  File "/usr/local/lib/python3.10/site-packages/kazam/backend/config.py", line 76, in __init__
    ConfigParser.__init__(self, self.DEFAULTS[0]['keys'])
  File "/usr/lib64/python3.10/configparser.py", line 639, in __init__
    self._read_defaults(defaults)
  File "/usr/lib64/python3.10/configparser.py", line 1223, in _read_defaults
    self.read_dict({self.default_section: defaults})
  File "/usr/lib64/python3.10/configparser.py", line 755, in read_dict
    self.set(section, key, value)
  File "/usr/local/lib/python3.10/site-packages/kazam/backend/config.py", line 126, in set
    self.add_section(section)
  File "/usr/lib64/python3.10/configparser.py", line 1212, in add_section
    super().add_section(section)
  File "/usr/lib64/python3.10/configparser.py", line 656, in add_section
    raise ValueError('Invalid section name: %r' % section)
ValueError: Invalid section name: 'DEFAULT'

@niknah
Copy link

niknah commented May 19, 2022

That's a warning the error is
ValueError: Invalid section name: 'DEFAULT'

Remove the ~/.config/kazam/kazam.conf

Or try my fork https://github.com/niknah/kazam

@TheBallOfAeolus
Copy link
Author

Thank you @niknah
Removing the file did not work, but your fork is working! ;)

One detail... the

pip3 install Xlib Pycairo PyGObject 

is returning an error, my solution was installing the fedora packages manually:

sudo dnf install python3-xlib pygobject2-devel pygobject2 cairo-devel pkg-config python3-devel

afterwards I was able to start the app via

bash bin/run_local_dev.sh

;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants