(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:
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 images( "/home/ littlegirl/ Desktop" ) "exampleimage" )
xp = Xpresser()
xp.load_
xp.click(
(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 python2. 7/dist- packages/ xpresser/ __init_ _.py", line 21, in <module> python2. 7/dist- packages/ xpresser/ xp.py", line 22, in <module> python2. 7/dist- packages/ xpresser/ xutils. py", line 26, in <module>
Traceback (most recent call last):
File "example.py", line 1, in <module>
from xpresser import Xpresser
File "/usr/lib/
from xpresser.xp import Xpresser, ImageNotFound
File "/usr/lib/
from xpresser import xutils
File "/usr/lib/
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 girepository- 1.0 libgirepository -1.0.so. 1 libgirepository -1.0.so. 1.0.0 girepository- 1.0/GIRepositor y-2.0.typelib girepository- 1.0/GLib- 2.0.typelib girepository- 1.0/GModule- 2.0.typelib girepository- 1.0/GObject- 2.0.typelib girepository- 1.0/Gio- 2.0.typelib doc/libgireposi tory-1. 0-1 doc/libgireposi tory-1. 0-1/AUTHORS doc/libgireposi tory-1. 0-1/NEWS. gz doc/libgireposi tory-1. 0-1/README doc/libgireposi tory-1. 0-1/TODO doc/libgireposi tory-1. 0-1/changelog. Debian. gz doc/libgireposi tory-1. 0-1/copyright dpkg/info/ libgirepository -1.0-1. list dpkg/info/ libgirepository -1.0-1. md5sums dpkg/info/ libgirepository -1.0-1. postinst dpkg/info/ libgirepository -1.0-1. postrm dpkg/info/ libgirepository -1.0-1. shlibs dpkg/info/ libgirepository -1.0-1. symbols
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/usr/share/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
/var/lib/
Yet I'm still getting the error(s) as seen in step (8) above.