Bug#1117444: Cannot run: TypeError by GioUnix.DesktopAppInfo.get_filename() in gtweak/utils.py

Jongmin Kim jmkim at debian.org
Sun Oct 5 19:43:20 BST 2025


Package: gnome-tweaks
Version: 49.0-1
Severity: important
Tags: patch

Dear gnome-tweaks maintainers,

After a recent update, gnome-tweaks fails to start with the following
traceback:

    Traceback (most recent call last):
      File "/usr/bin/gnome-tweaks", line 100, in <module>
        from gtweak.app import GnomeTweaks
      File "/usr/lib/python3/dist-packages/gtweak/app.py", line 13, in <module>
        from gtweak.tweakview import Window
      File "/usr/lib/python3/dist-packages/gtweak/tweakview.py", line 20, in <module>
        from gtweak.tweaks.tweak_group_startup import TWEAK_GROUP as StartupApplicationTweaks
      File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_startup.py", line 348, in <module>
        TWEAK_GROUP = AutostartTweakGroup()
      File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_startup.py", line 243, in __init__
        self._startup_dapps = self._get_startup_desktop_files()
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
      File "/usr/lib/python3/dist-packages/gtweak/tweaks/tweak_group_startup.py", line 327, in _get_startup_desktop_files
        if not AutostartFile(dappinfo).is_start_at_login_enabled():
               ~~~~~~~~~~~~~^^^^^^^^^^
      File "/usr/lib/python3/dist-packages/gtweak/utils.py", line 156, in __init__
        self._desktop_file = appinfo.get_filename()
                             ~~~~~~~~~~~~~~~~~~~~^^
    TypeError: GioUnix.DesktopAppInfo.get_filename() takes exactly 1 argument (0 given)

This issue seems to be caused by a change in the GI bindings. This issue
was already reported to upstream:

    https://gitlab.gnome.org/GNOME/gnome-tweaks/-/issues/528

With the proposed patch, gnome-tweaks starts normally. The proposed patch
is available at:

    https://gitlab.gnome.org/GNOME/gnome-tweaks/-/merge_requests/173

--- /usr/lib/python3/dist-packages/gtweak/utils.py.orig	2025-10-06 03:00:24.377253424 +0900
+++ /usr/lib/python3/dist-packages/gtweak/utils.py	2025-10-06 03:34:26.743701735 +0900
@@ -134,7 +134,7 @@

     @staticmethod
     def get_desktop_files():
-        return [a.get_filename() for a in Gio.app_info_get_all()]
+        return [a.get_filename(a) for a in Gio.app_info_get_all()]

     @staticmethod
     def get_user_autostart_files():
@@ -153,7 +153,7 @@
 class AutostartFile:
     def __init__(self, appinfo, autostart_desktop_filename="", exec_cmd="", extra_exec_args=""):
         if appinfo:
-            self._desktop_file = appinfo.get_filename()
+            self._desktop_file = appinfo.get_filename(appinfo)
             self._autostart_desktop_filename = autostart_desktop_filename or os.path.basename(self._desktop_file)
             self._create_file = False
         elif autostart_desktop_filename:

-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.16.9+deb14-amd64 (SMP w/22 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE=en_US.UTF-8
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-tweaks depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.49.0-1
ii  gir1.2-adw-1                                 1.8.0-1
ii  gir1.2-gdesktopenums-3.0                     49.0-1
ii  gir1.2-glib-2.0                              2.84.4-3
ii  gir1.2-gnomedesktop-4.0                      44.4-1
ii  gir1.2-gtk-4.0                               4.20.1+ds-2
ii  gir1.2-gudev-1.0                             238-7
ii  gir1.2-notify-0.7                            0.8.6-2
ii  gir1.2-pango-1.0                             1.56.3-2
ii  gnome-settings-daemon                        48.1-2
ii  gnome-shell-common                           48.5-2
ii  gsettings-desktop-schemas                    49.0-1
ii  mutter-common                                48.5-1
ii  python3                                      3.13.7-1
ii  python3-gi                                   3.50.0-7
ii  user-session-migration                       0.5.0

gnome-tweaks recommends no packages.

Versions of packages gnome-tweaks suggests:
ii  gnome-shell-extension-prefs  48.5-2

-- no debconf information



More information about the pkg-gnome-maintainers mailing list