python3-xmmsclient glib connector outdated and doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xmms2 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
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://
100 /var/lib/
$ 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://
100 /var/lib/
$
$ 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>
ModuleNotFoundE
>>>
$
```
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.
Sorry, I typo'd the test command and didn't realise before submitting the bug report. This is the correct error:
$ python3 python3/ dist-packages/ xmmsclient/ glib.py" , line 13, in <module> rror: No module named 'gobject'
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.glib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/
from gobject import io_add_watch, IO_OUT, IO_IN, source_remove
ModuleNotFoundE
>>>
$