After I upgraded to Ubuntu 14.04 the dialog system-config-printer in gnome runs into problems when called from the command line:
sudo system-config-printer
Traceback (most recent call last):
File "/usr/share/system-config-printer/system-config-printer.py", line 72, in <module>
from gi.repository import GObject # for TYPE_STRING and TYPE_PYOBJECT
File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 32, in <module>
raise ImportError('When using gi.repository you must not import static '
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".
The problem persisted when I tried to change the suggested imports in the package, i.e.,
cd /usr/share/system-config-printer
sed -i 's/import gobject/from gi.repository import GObject/g' *.py
sed -i 's/gobject/GObject/g' *.py
Thanks for your help.