[packagekit] Traceback from python API call

Andrew Stormont andyjstormont at gmail.com
Tue Sep 28 00:20:24 PDT 2010


Hi,

The python client interface is currently broken but with a bit of hacking
you can get everything working again.

I have some patches that fix this that I've been meaning to submit.

Andy

On 28 September 2010 04:47, Garrett Holmstrom <gholms at fedoraproject.org>wrote:

> 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
> _______________________________________________
> PackageKit mailing list
> PackageKit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/packagekit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20100928/928eb79c/attachment-0003.htm>


More information about the PackageKit mailing list