Comment 0 for bug 829186

Martin Pitt (pitti) wrote :

This is a tracking bug for fixing programs which will crash with a newer pygobject >= 2.90. This is now absolutely zero tolerant against importing both the static and the GI version of a particular library. This was mostly the case with 2.28 as well, but did work in some cases (like "import gobject; from gi.repository import Gtk", in particular for "glib" and "gobject"). These now cause errors as well.

$ ubuntuone-control-panel-gtk
Traceback (most recent call last):
  File "/usr/bin/ubuntuone-control-panel-gtk", line 33, in <module>
    from ubuntuone.controlpanel.gui.gtk import main
  File "/usr/lib/python2.7/dist-packages/ubuntuone-control-panel/ubuntuone/controlpanel/gui/gtk/", line 28, in <module>
    from ubuntuone.controlpanel.gui.gtk.gui import main
  File "/usr/lib/python2.7/dist-packages/ubuntuone-control-panel/ubuntuone/controlpanel/gui/gtk/", line 39, in <module>
    from gi.repository import GLib
  File "/usr/lib/python2.7/dist-packages/gi/", line 23, in <module>
    from ._gi import _API, Repository
ImportError: could not import gobject (error was: ImportError('When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject".',))