LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   PyGObject desktop notifications stopped working (https://www.linuxquestions.org/questions/slackware-14/pygobject-desktop-notifications-stopped-working-4175710943/)

murdo 04-18-2022 04:15 AM

PyGObject desktop notifications stopped working
 
Hi! I have a Python program I've been using for a long time without issue, but after starting my computer up today it has started crashing with the following traceback:

Code:

Traceback (most recent call last):
  File "/home/murdo/.grafeas/programs/clone-finder/clone_finder", line 31, in <module>
    clone_finder()
  File "/home/murdo/.grafeas/programs/clone-finder/torcf/main.py", line 74, in clone_finder
    find_wanted(post, Notify)
  File "/home/murdo/.grafeas/programs/clone-finder/torcf/post.py", line 120, in find_wanted
    Notify.Notification.new(f"Found {post.subreddit} post.").show()
gi.repository.GLib.GError: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: Method "Notify" with signature "susssasa{sv}i" on interface "org.freedesktop.Notifications" doesn't exist
 (19)

It was working when I started it yesterday morning, and the only updates I've performed on my system since were upgrading alien's KeepassXC build and installing its new dependencies (botan, minizip, pcsc-lite). I haven't changed any of the code in the program itself either.

Fixes I've tried: upgrading PyGObject to 3.42.1 (released yesterday); using a different Python library for the notifications (notify2). Both ended in the same error. I also tried restarting my system.


EDIT:
As a side-note, LinuxQuestions seems to be having real trouble detecting my OS. It keeps switching between Windows 10 and unknown, but I'm definitely using Slackware Current.

qsantos 07-02-2022 12:26 PM

Hi!

I had a very similar issue (at least, same error message). I have been able to work around it by editing /usr/share/dbus-1/session.conf and doing the following change and then restarting my session. Maybe it will help you as well.

Code:

-    <allow send_destination="*" eavesdrop="true"/>
+    <allow send_destination="*" eavesdrop="false"/>
    <!-- Allow everything to be received -->
-    <allow eavesdrop="true"/>
+    <allow eavesdrop="false"/>

See: https://unix.stackexchange.com/quest...d-error/708385.

teckk 07-02-2022 02:12 PM

It's not unusual for a python script/program to stop working with an update. Even if python and it's modules match. Python just up and changes without any regard for backwards compatibility, and you'll need to fix your scripts. Or if you update something that gobject depends on without updating everything, or it doesn't match glib.

keepassxc is cpp
https://github.com/keepassxreboot/keepassxc
https://github.com/keepassxreboot/ke...lop/INSTALL.md
https://keepassxc.org/blog/

botan is python somewhat
https://github.com/randombit/botan
https://github.com/randombit/botan/b...thon/botan2.py

pcsc-lite is somewhat python.
https://github.com/max2344/pcsc-lite

Now, how to fix it. My first remark would be, that is what a package manager is for.

You've updated a library, or something that gobject depends upon.
Quote:

gi.repository.GLib.GError:
I don't think anyone other than a keepassxc developer is going to pin point this for you.

You will have to look through all of the depends for everything, and see what is broke.

If I could tell you more I would.


All times are GMT -5. The time now is 11:33 AM.