Public bug reported:

Fresh Hirsuite install, with python3-xmmsclient and python3-gi packages
installed.  Importing `xmmsclient.glib` fails, because it's trying to
load from the (python2-era) `gobject` module:

```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 21.04
Release:        21.04
Codename:       hirsute
$ apt-cache policy python3-xmmsclient
python3-xmmsclient:
  Installed: 0.8+dfsg-21build1
  Candidate: 0.8+dfsg-21build1
  Version table:
 *** 0.8+dfsg-21build1 500
        500 http://au.archive.ubuntu.com/ubuntu hirsute/universe amd64 Packages
        100 /var/lib/dpkg/status
$ apt-cache policy python3-gi
python3-gi:
  Installed: 3.38.0-4
  Candidate: 3.38.0-4
  Version table:
 *** 3.38.0-4 500
        500 http://au.archive.ubuntu.com/ubuntu hirsute/main amd64 Packages
        100 /var/lib/dpkg/status
$
$ python3
Python 3.9.5 (default, May 11 2021, 08:20:37)
[GCC 10.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xmmsclient.xlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'xmmsclient.xlib'
>>>
$
```

The fix appears to be to change this line in xmmsclient/glib.py:

    from gobject import io_add_watch, IO_OUT, IO_IN, source_remove

to instead read:

    from gi.repository.GLib import io_add_watch, IO_OUT, IO_IN,
source_remove

This allows the module to load and function as expected.

** Affects: xmms2 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1945885

Title:
  python3-xmmsclient glib connector outdated and doesn't work

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xmms2/+bug/1945885/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to