Fails to load widgets that use the pygi bindings

Bug #847650 reported by Evan
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
glade (Ubuntu)
Confirmed
Undecided
Ubuntu Desktop

Bug Description

With the move to disallow importing of static modules alongside pygi, glade no longer loads widgets built with the latter:

evan@poppy-dev:~/bzr/ubiquity$ GLADE_CATALOG_PATH=/home/evan/bzr/ubiquity/gui/gtk GLADE_MODULE_PATH=/home/evan/bzr/ubiquity/ubiquity glade
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/evan/bzr/ubiquity/ubiquity/gtkwidgets.py", line 3, in <module>
    from gi.repository import Gtk, Gdk, GObject, Pango
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", 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".',))
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/evan/bzr/ubiquity/ubiquity/nm.py", line 5, in <module>
    from gi.repository import Gtk, GObject
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 23, in <module>
    from ._gi import _API, Repository
ImportError: cannot import name _API

Revision history for this message
Evan (ev) wrote :

This is due to the glade_python_init_pygobject_check function, which loads the static gobject python library.

Evan (ev)
Changed in glade (Ubuntu):
assignee: nobody → Ubuntu Desktop (ubuntu-desktop)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glade (Ubuntu):
status: New → Confirmed
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.