X2Go Bug report logs - #989
pyhoca-gui fails to fall back to Gtk-2.0 notifications (pynotify)

version graph

Package: pyhoca-gui; Maintainer for pyhoca-gui is X2Go Developers <x2go-dev@lists.x2go.org>; Source for pyhoca-gui is src:pyhoca-gui.

Reported by: Ondřej Grover <ondrej.grover@gmail.com>

Date: Sun, 31 Jan 2016 08:05:02 UTC

Severity: normal

Found in version 0.5.0.5-0x2go1+git20160128.1329+jessie.main.1

Full log


🔗 View this message in rfc822 format

X-Loop: owner@bugs.x2go.org
Subject: Bug#989: [X2Go-Dev] Bug#989: pyhoca-gui fails to fall back to Gtk-2.0 notifications (pynotify)
Reply-To: Mihai Moldovan <ionic@ionic.de>, 989@bugs.x2go.org
Resent-From: Mihai Moldovan <ionic@ionic.de>
Resent-To: x2go-dev@lists.x2go.org
Resent-CC: X2Go Developers <x2go-dev@lists.x2go.org>
X-Loop: owner@bugs.x2go.org
Resent-Date: Thu, 04 Feb 2016 16:50:02 +0000
Resent-Message-ID: <handler.989.B989.145460457523237@bugs.x2go.org>
Resent-Sender: owner@bugs.x2go.org
X-X2Go-PR-Message: followup 989
X-X2Go-PR-Package: pyhoca-gui
X-X2Go-PR-Keywords: 
Received: via spool by 989-submit@bugs.x2go.org id=B989.145460457523237
          (code B ref 989); Thu, 04 Feb 2016 16:50:02 +0000
Received: (at 989) by bugs.x2go.org; 4 Feb 2016 16:49:35 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-2.0 required=3.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham
	version=3.3.2
Received: from localhost (localhost [127.0.0.1])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 74AAC5DA90
	for <989@bugs.x2go.org>; Thu,  4 Feb 2016 17:49:33 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at ymir.das-netzwerkteam.de
Received: from ymir.das-netzwerkteam.de ([127.0.0.1])
	by localhost (ymir.das-netzwerkteam.de [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id OvI9U9aRhwap for <989@bugs.x2go.org>;
	Thu,  4 Feb 2016 17:49:33 +0100 (CET)
Received: from Root24.de (powered.by.root24.eu [5.135.3.88])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTP id 1323C5DA86
	for <989@bugs.x2go.org>; Thu,  4 Feb 2016 17:49:32 +0100 (CET)
Received: from nopileos.local (home.ionic.de [217.92.117.31])
	by mail.ionic.de (Postfix) with ESMTPSA id 4D40B4F00B28;
	Thu,  4 Feb 2016 17:49:32 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=ionic.de; s=default;
	t=1454604572; bh=PQM8NCu5AWKDsHIjsbNGwvrDOqXcpiJCwUBPOHMIrAs=;
	h=Subject:To:References:From:Date:In-Reply-To:From;
	b=hrPpoifyD60Y2YQ4fk1uCyqq195D+azUCYSaibK3D5yLZ8Nm3WcSgEhGVfXhWeOZ7
	 NEXawGXmwso4alsmzh4Fg4zhPuV+R+dujfTocmHOpQjtWBySUbeSi7axL9bJAjKKLq
	 c0rrWvklVVzybjpqkyPPm8HJxSCxE/FEyun73hCM=
To: Ondřej Grover <ondrej.grover@gmail.com>,
 989@bugs.x2go.org
References: <CAOyjJOKY4VpqcqKJ2St58tepAgKipgdc=TeGJtgsFpZf5qccdA@mail.gmail.com>
From: Mihai Moldovan <ionic@ionic.de>
X-Enigmail-Draft-Status: N1110
Message-ID: <56B38113.70103@ionic.de>
Date: Thu, 4 Feb 2016 17:49:23 +0100
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:38.0)
 Gecko/20100101 Thunderbird/38.5.1
MIME-Version: 1.0
In-Reply-To: <CAOyjJOKY4VpqcqKJ2St58tepAgKipgdc=TeGJtgsFpZf5qccdA@mail.gmail.com>
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature";
 boundary="HWIO8fHaICp2uIixNxXDqP4bqVfDHt94S"
[Message part 1 (text/plain, inline)]
On 31.01.2016 09:04 AM, Ondřej Grover wrote:
> I believe commit e44e848415eff3e4dab69e990adfc447e79143f8 which introduced GTK3
> notification support broke GTK2 notification support fallback. The problem was
> not present in 0.5.0.4
> 
> I believe the problem lies in this import construct in
> pyhoca/wxgui/notify.py which will fail the same way even when put alone in a file
> 
> try:
>     from gi.repository import Notify as _Notify
> except ImportError:
>     import pynotify as _Notify
> 
> I think the problem is that even if the GTK3 Notify module is not available,
> many GTK3 libraries get loaded and then the pynotify import fails with 
> 
> ImportError: could not import gobject (could not find _PyGObject_API object)
> 
> This is the same exception I see when running pyhoca-gui.
> 
> I think some more sophisticated GTK version selection mechanism is needed, one
> that would not start loading conflicting libraries.

Thanks for the report. I think your analysis is spot-on.

It looks like a lot of modules from gobject-introspection are loaded, until it
hits an error importing the Notify module.

Then, importing pynotify fails, because the old, static python-gobject module
that pynotify depends on conflicts with the new python-gi
(gobject-introspection) modules.


> As a workaround for now I just removed that GTK3 import on my system.

But it's just that, a workaround.

I've been looking around for a way to actually rollback a failing module import
and came up with zit.

The only "actual" solution I currently see is removing pynotify support
completely, because the gobjects interface is deprecated anyway. However,
that'll break notification support on older systems not having GI/GTK3.

Not that I'd like it, of course. A working fallback would have been great.



Mihai

[signature.asc (application/pgp-signature, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Mar 29 09:10:46 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.