udevdiscover fails to start due to gudev import error

Bug #1423432 reported by Kip Warner
52
This bug affects 10 people
Affects Status Importance Assigned to Milestone
udev-discover
New
Undecided
Unassigned
udev-discover (Debian)
New
Undecided
ben

Bug Description

udev-discover fails to launch due to what appears to be a gudev or GObject introspection error.

$ udev-discover
Traceback (most recent call last):
  File "/usr/bin/udev-discover", line 29, in <module>
    from udevdiscover import DeviceFinder, get_subsystems
  File "/usr/lib/python2.7/dist-packages/udevdiscover/__init__.py", line 23, in <module>
    from devicefinder import DeviceFinder, get_subsystems
  File "/usr/lib/python2.7/dist-packages/udevdiscover/devicefinder.py", line 26, in <module>
    import gudev
ImportError: could not import gobject (could not find _PyGObject_API object)

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.10
Release: 14.10
Codename: utopic

$ apt-cache show udev-discover
Package: udev-discover
Priority: optional
Section: universe/gnome
Installed-Size: 781
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: J. Félix Ontañón <email address hidden>
Architecture: amd64
Version: 0.2.2-1
Depends: gconf2 (>= 2.28.1-2), python2.7, python (>= 2.7.1-0ubuntu2), python (<< 2.8), python-gconf, python-gudev, python-gobject, gir1.2-gtk-3.0, gir1.2-gconf-2.0, gir1.2-gdkpixbuf-2.0, gnome-icon-theme-full | gnome-icon-theme-extras
Filename: pool/universe/u/udev-discover/udev-discover_0.2.2-1_amd64.deb
Size: 104354
MD5sum: dc2c964614f0b26a9dc85d3d7c42613b
SHA1: 68ba4c13fc1283da28a1c5681a3e03fd3aab7f35
SHA256: 32292b963b002133fc56a5ad3a13bad58185f8fe6dcb5b8c94871d9e60e2bfca
Description-en: Sysfs browsing tool focused on helping udev users and developers
 A helping tool for udev testers, coders, hackers and consumers.
    * Browsing the sysfs tree via udev
    * Reports udev device info and udev properties
    * Filter and search devices
    * Monitorize udev device events
Description-md5: 0dede53ee3912c670b5232d72b623118
Homepage: http://fontanon.org/udevdiscover
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

affects: debian → udev-discover (Debian)
Changed in udev-discover (Debian):
assignee: nobody → ben (drache-deactivatedaccount)
Revision history for this message
Bob Vincent (pillarsdotnet) wrote :

Running strace -vf udev-discover 2>&1 | grep -i '/usr/lib/python2.7/dist-packages/.*gobject.*\.so' shows that python is looking for the gobject dll in /usr/lib/python2.7/dist-packages/gi/overrides/GObject.x86_64-linux-gnu.so.

So I did this:
sudo ln -s /usr/lib/python2.7/dist-packages/gobject/_gobject.x86_64-linux-gnu.so /usr/lib/python2.7/dist-packages/gi/overrides/GObject.x86_64-linux-gnu.so

Then re-ran udev-discover, which yielded another error:

Traceback (most recent call last):
  File "/usr/bin/udev-discover", line 27, in <module>
    from gi.repository import Gtk, Gdk
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 145, in load_module
    importlib.import_module('gi.repository.' + dep.split("-")[0])
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/usr/lib/python2.7/dist-packages/gi/importer.py", line 146, in load_module
    dynamic_module = load_overrides(introspection_module)
  File "/usr/lib/python2.7/dist-packages/gi/overrides/__init__.py", line 125, in load_overrides
    override_mod = importlib.import_module(override_package_name)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: dynamic module does not define init function (initGObject)

Unfortunately, "grep -rl initGObject /usr/lib" yields zero matches.

Revision history for this message
Dan Snider (dephekt) wrote :

I followed up with what Bob posted, I linked the gobject module to where python was looking then ran another trace and piped the output to file (see attached).

Revision history for this message
Dan Snider (dephekt) wrote :

Sorry I forgot to mention my system info:

$lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

$apt-cache show udev-discover
Package: udev-discover
Priority: optional
Section: universe/gnome
Installed-Size: 679
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: J. Félix Ontañón <email address hidden>
Architecture: amd64
Version: 0.2.2-1.2
Depends: gconf2 (>= 2.28.1-2), python:any (<< 2.8), python:any (>= 2.7.5-5~), python-gconf, python-gudev, python-gobject, gir1.2-gtk-3.0, gir1.2-gconf-2.0, gir1.2-gdkpixbuf-2.0, gnome-icon-theme | gnome-icon-theme-extras
Filename: pool/universe/u/udev-discover/udev-discover_0.2.2-1.2_amd64.deb
Size: 50958
MD5sum: af4f5612f561ced026b92cd82d9ecd18
SHA1: de86e844a1d3e6793674918dbba1816e3cb67245
SHA256: 23c47ab459b146185e0d06c37a1d0c400cbf1b609d8e8de449ad3dda67899571
Description-en: Sysfs browsing tool focused on helping udev users and developers
 A helping tool for udev testers, coders, hackers and consumers.
    * Browsing the sysfs tree via udev
    * Reports udev device info and udev properties
    * Filter and search devices
    * Monitorize udev device events
Description-md5: 0dede53ee3912c670b5232d72b623118
Homepage: http://fontanon.org/udevdiscover
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

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.