Uncaught exception if gi is installed, but Notify module is not
mirekdlugosz opened this issue · comments
If gi
module is available, but Notify
object in gi repository is not, mpDris2 fails to start due to uncaught exception:
$ mpDris2
Traceback (most recent call last):
File "./mpDris2.in.py", line 55, in <module>
gi.require_version('Notify', '0.7')
File "/usr/lib/python3/dist-packages/gi/__init__.py", line 118, in require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Notify not available
I have found this issue on my Debian box. Debian mpdris2
package recommends gir1.2-notify-0.7
and in description states It can (...) send track-change notifications if gir1.2-notify-0.7 is installed. Since I do not install recommended packages by default and I decided that I do not want notifications, I opted out of installing gir1.2-notify-0.7
.
As you can see in trackback, gi.require_version
will raise ValueError exception if requested module is not available. mpDris2, however, catches only ImportError
- which would be raised by import
if gi
is not installed.
Projects using QtWebKit should change to QtWebEngine i think.
I encountered this issue on OpenSUSE Tumbleweed, couldn't find the solution since I couldn't find the equivalent of the gir1.2-notify-0.7
Debian package. Turns out it's included in the libnotify4-devel
package. Sorry to bump a closed, old thread, but I was getting this exact error until I installed the devel package. Hope this helps someone.