Comment 3 for bug 1086180

Revision history for this message
Little Girl (littlergirl) wrote :

I've had a similar experience on a smaller scale:

(1) I use Kubuntu Precise Pangolin LTS.

(2) I went to this page:

https://wiki.ubuntu.com/Xpresser

(3) I used the information from the "Getting started" section in that page to install Xpresser from the package manager after adding its PPA to my sources.

(4) I copied this from the "Fire it up" and "Clicking somewhere" sections of that page and changed the path and file name to point to an image on my Desktop:

from xpresser import Xpresser
xp = Xpresser()
xp.load_images("/home/littlegirl/Desktop")
xp.click("exampleimage")

(5) I saved it as example.py on my Desktop.

(6) I opened a terminal window on my Desktop.

(7) I ran this command in the terminal window:

python2.7 example.py

(8) I got this result:

ERROR:root:Could not find any typelib for Gdk
Traceback (most recent call last):
  File "example.py", line 1, in <module>
    from xpresser import Xpresser
  File "/usr/lib/python2.7/dist-packages/xpresser/__init__.py", line 21, in <module>
    from xpresser.xp import Xpresser, ImageNotFound
  File "/usr/lib/python2.7/dist-packages/xpresser/xp.py", line 22, in <module>
    from xpresser import xutils
  File "/usr/lib/python2.7/dist-packages/xpresser/xutils.py", line 26, in <module>
    from gi.repository import Gdk
ImportError: cannot import name Gdk

(9) I found a bug report on "xpressor package dependency GI not working " on this page:

https://bugs.launchpad.net/xpresser/+bug/1086180

It looks very much like the error I'm getting.

(10) The only help the person was given was the suggestion to make sure python-gi is installed.

(11) On my machine, python-gi and python2.7 are installed:

$ dpkg --get-selections python-gi
python-gi install

$ dpkg --get-selections python2.7
python2.7 install

I've got the girepository:

$ locate girepository
/usr/lib/girepository-1.0
/usr/lib/libgirepository-1.0.so.1
/usr/lib/libgirepository-1.0.so.1.0.0
/usr/lib/girepository-1.0/GIRepository-2.0.typelib
/usr/lib/girepository-1.0/GLib-2.0.typelib
/usr/lib/girepository-1.0/GModule-2.0.typelib
/usr/lib/girepository-1.0/GObject-2.0.typelib
/usr/lib/girepository-1.0/Gio-2.0.typelib
/usr/share/doc/libgirepository-1.0-1
/usr/share/doc/libgirepository-1.0-1/AUTHORS
/usr/share/doc/libgirepository-1.0-1/NEWS.gz
/usr/share/doc/libgirepository-1.0-1/README
/usr/share/doc/libgirepository-1.0-1/TODO
/usr/share/doc/libgirepository-1.0-1/changelog.Debian.gz
/usr/share/doc/libgirepository-1.0-1/copyright
/var/lib/dpkg/info/libgirepository-1.0-1.list
/var/lib/dpkg/info/libgirepository-1.0-1.md5sums
/var/lib/dpkg/info/libgirepository-1.0-1.postinst
/var/lib/dpkg/info/libgirepository-1.0-1.postrm
/var/lib/dpkg/info/libgirepository-1.0-1.shlibs
/var/lib/dpkg/info/libgirepository-1.0-1.symbols

Yet I'm still getting the error(s) as seen in step (8) above.