[packagekit] Traceback from python API call

Garrett Holmstrom gholms at fedoraproject.org
Mon Sep 27 19:47:19 PDT 2010


Hi folks,

I'm trying to familiarize myself with PK's python API as I try to 
generalize a script that normally calls apt directly, but I seem to be 
doing something wrong.  When I call the following script on Fedora DBus 
throws an exception.  Any clue what my problem might be?

--

#!/usr/bin/python -tt

import packagekit.client

client = packagekit.client.PackageKitClient()
print client.get_updates()

--

Traceback (most recent call last):
   File "./test2.py", line 6, in <module>
     print client.get_updates()
   File "/usr/lib/python2.6/site-packages/packagekit/client.py", line 
310, in get_updates
     return self._run_transaction("GetUpdates", [filters], exit_handler)
   File "/usr/lib/python2.6/site-packages/packagekit/client.py", line 
441, in _run_transaction
     trans.set_locale(self._locale)
   File "/usr/lib/python2.6/site-packages/packagekit/client.py", line 
171, in set_locale
     return self._iface.SetLocale(code)
   File "/usr/lib/python2.6/site-packages/dbus/proxies.py", line 140, in 
__call__
     **keywords)
   File "/usr/lib/python2.6/site-packages/dbus/connection.py", line 630, 
in call_blocking
     message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: 
Method "SetLocale" with signature "s" on interface 
"org.freedesktop.PackageKit.Transaction" doesn't exist



More information about the PackageKit mailing list