Ubuntu Groovy proposed:networkd-dispatcher.service ModuleNotFoundError: No module named 'glib'

Bug #1890438 reported by bbhtt
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
networkd-dispatcher (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Journalctl:

3-- A start job for unit networkd-dispatcher.service has begun execution.
--
-- The job identifier is 2671.
Aug 05 10:22:38 networkd-dispatcher[24517]: Traceback (most recent call last):
Aug 05 10:22:38 networkd-dispatcher[24517]: File "/usr/bin/networkd-dispatcher", line 25, in <module>
Aug 05 10:22:38 networkd-dispatcher[24517]: from gi.repository import GLib as glib # pragma: no cover
Aug 05 10:22:38 networkd-dispatcher[24517]: ModuleNotFoundError: No module named 'gi'
Aug 05 10:22:38 networkd-dispatcher[24517]: During handling of the above exception, another exception occurred:
Aug 05 10:22:38 networkd-dispatcher[24517]: Traceback (most recent call last):
Aug 05 10:22:38 networkd-dispatcher[24517]: File "/usr/bin/networkd-dispatcher", line 27, in <module>
Aug 05 10:22:38 networkd-dispatcher[24517]: import glib # pragma: no cover
Aug 05 10:22:38 networkd-dispatcher[24517]: ModuleNotFoundError: No module named 'glib'
Aug 05 10:22:38 systemd[1]: networkd-dispatcher.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit networkd-dispatcher.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Aug 05 10:22:38 systemd[1]: networkd-dispatcher.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
 An ExecStart= process belonging to unit networkd-dispatcher.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Aug 05 10:22:38 systemd[1]: networkd-dispatcher.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit networkd-dispatcher.service has entered the 'failed' state with result 'exit-code'.
Aug 05 10:22:38 systemd[1]: Failed to start Dispatcher daemon for systemd-networkd.
-- Subject: A start job for unit networkd-dispatcher.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit networkd-dispatcher.service has finished with a failure.
--

systemctl status:

● networkd-dispatcher.service - Dispatcher daemon for systemd-networkd
     Loaded: loaded (/lib/systemd/system/networkd-dispatcher.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2020-08-05 05:39:10
    Process: 1118 ExecStart=/usr/bin/networkd-dispatcher $networkd_dispatcher_args (code=exited, status>
   Main PID: 1118 (code=exited, status=1/FAILURE)

Aug 05 06:39:10 kortewegdevries networkd-dispatcher[1118]: from gi.repository import GLib as glib >
Aug 05 06:39:10 kortewegdevries networkd-dispatcher[1118]: ModuleNotFoundError: No module named 'gi'
Aug 05 06:39:10 kortewegdevries networkd-dispatcher[1118]: During handling of the above exception, anot>
Aug 05 06:39:10 kortewegdevries networkd-dispatcher[1118]: Traceback (most recent call last):
Aug 05 06:39:10 kortewegdevries networkd-dispatcher[1118]: File "/usr/bin/networkd-dispatcher", line >
Aug 05 06:39:10 kortewegdevries networkd-dispatcher[1118]: import glib >
Aug 05 06:39:10 kortewegdevries networkd-dispatcher[1118]: ModuleNotFoundError: No module named 'glib'
Aug 05 06:39:10 kortewegdevries systemd[1]: networkd-dispatcher.service: Main process exited, code=exit>
Aug 05 06:39:10 kortewegdevries systemd[1]: networkd-dispatcher.service: Failed with result 'exit-code'.
Aug 05 06:39:10 kortewegdevries systemd[1]: Failed to start Dispatcher daemon for systemd-networkd.

$ locate glib.py

/usr/lib/python3/dist-packages/dbus/glib.py
/usr/lib/python3/dist-packages/dbus/mainloop/glib.py

System:

Kernel: 5.8.0-12-generic x86_64 bits: 64 compiler: N/A Desktop: Xfce 4.14.2
Distro: Ubuntu 20.10 (Groovy Gorilla) (*Proposed)

 networkd-dispatcher 2.0.1-1
linux-firmware 1.189
 ---------------------------------------------------
systemd,systemd-coredump,
systemd-sysv 245.7-1ubuntu1
---------------------------------------------------

Hopefully this is the right place to report. Tried installing packages that contain glib.py didn't help.

Tags: groovy
bbhtt (bbhtt)
description: updated
bbhtt (bbhtt)
tags: added: groovy
Revision history for this message
bbhtt (bbhtt) wrote : (No Subject)

Still present on kernel Ubuntu 5.8.0-16.17-generic 5.8.0

Revision history for this message
bbhtt (bbhtt) wrote :

I a guessing this is what that fixed it:

Apparently gobject PyGObject were missing for the root user but was installed for me. So I installed both as root via pip and it works fine, or it could be a update I didn't follow...

● networkd-dispatcher.service - Dispatcher daemon for systemd-networkd
     Loaded: loaded (/lib/systemd/system/networkd-dispatcher.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2020-08-22 05:35:16 UTC; 2min 18s ago
   Main PID: 1127 (networkd-dispat)
      Tasks: 1 (limit: 8159)
     Memory: 19.1M
     CGroup: /system.slice/networkd-dispatcher.service
             └─1127 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers

Aug 22 05:34:59 kortewegdevries systemd[1]: Starting Dispatcher daemon for systemd-networkd...
Aug 22 05:35:16 kortewegdevries networkd-dispatcher[1354]: WARNING: systemd-networkd is not running, ou>
Aug 22 05:35:16 kortewegdevries systemd[1]: Started Dispatcher daemon for systemd-networkd.

Revision history for this message
Julian Andres Klode (juliank) wrote :

The correct depends are all there.

Depends: dbus, gir1.2-glib-2.0, python3-dbus, python3-gi, python3:any

Hence from gi.repository import GLib should work.

@kortewegdevries You really shouldn't install stuff via pip, maybe an earlier pip run broke it?

Changed in networkd-dispatcher (Ubuntu):
status: New → Incomplete
Revision history for this message
bbhtt (bbhtt) wrote : Re: [Bug 1890438] Re: Ubuntu Groovy proposed:networkd-dispatcher.service ModuleNotFoundError: No module named 'glib'

I know. I saw that the deps were satisfied but it still refused to run. This time I did it because I was building some python programs and needed pip to install some stuff, but pip failed building because gi and some other packages were missing as a dependancy. So I set a pkgconfig path and installed them as --user, still wouldn't run...doing above solved both problems...I guess something happened during an upgrade...

>-------- Original Message --------
>On Aug 28, 2020, 10:40 AM, Julian Andres >Klode < <email address hidden>> wrote:
>The correct depends are all there.
>Depends: dbus, gir1.2-glib-2.0, python3-dbus, >python3-gi, python3:any
>Hence from gi.repository import GLib should >work.
>@kortewegdevries You really shouldn't install >stuff via pip, maybe an
>earlier pip run broke it?
>\*\* Changed in: networkd-dispatcher (Ubuntu)
>status: New => Incomplete

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for networkd-dispatcher (Ubuntu) because there has been no activity for 60 days.]

Changed in networkd-dispatcher (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.