dbus.proxies:Introspect error

Asked by Stacey Johnson

I am just getting started using launchpadlib and am trying to get authenticated access to launchpad but can't seem to get it to work. I'm trying to run a simple hello-world app which has the following lines:

from launchpadlib.launchpad import Launchpad
launchpad = Launchpad.login_with('hello-world', 'production')
print 'Hello, %s!' % launchpad.me.display_name

When I run this application I get this:

johnstac@pern2:~$ python hello-world
The authorization page:
 (https://launchpad.net/+authorize-token?oauth_token=F8PC3LZm7RXSRgRLj7pj&allow_permission=DESKTOP_INTEGRATION)
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Press any key to continue or wait (5) seconds...
Waiting to hear from Launchpad about your decision...

Which doesn't open a browser and just sits there until I enter the link in a browser manually and authorize the application. In the browser the authorization appears to work but then I get these errors:

ERROR:dbus.proxies:Introspect error on :1.1:/org/freedesktop/secrets/aliases/default: dbus.exceptions.DBusException: org.freedesktop.Secret.Error.NoSuchObject: The '/org/freedesktop/secrets/aliases/default' object does not exist
ERROR:dbus.connection:Unable to set arguments ({'org.freedesktop.Secret.Item.Label': 'System-wide: Ubuntu (pern2)@https://api.launchpad.net/ @ launchpadlib', 'org.freedesktop.Secret.Item.Attributes': {'username': 'System-wide: Ubuntu (pern2)@https://api.launchpad.net/', 'service': 'launchpadlib'}}, dbus.Struct((dbus.ObjectPath('/org/freedesktop/secrets/session/s8'), '', dbus.ByteArray('<B64>WzFdCmNvbnN1bWVyX2tleSA9IFN5c3RlbS13aWRlOiBVYnVudHUgKHBlcm4yKQpjb25zdW1lcl9zZWNyZXQgPSAKYWNjZXNzX3Rva2VuID0gODBxa25OMTdGQko0NVJNdjZoRjIKYWNjZXNzX3NlY3JldCA9IDIydjQyNERackdXVnNDcWdObk1GbnFGZDU4ekxDREx3dFM0NEttOXpTcG1zNHFUTkh0TUJCNVFNamhaSEdSRndINjhnNDNwUnJNbnR3ZlNuCgo='), 'text/plain'), signature=None), True) according to signature None: <type 'exceptions.TypeError'>: Expected a string or unicode object
Traceback (most recent call last):
  File "hello-world", line 2, in <module>
    launchpad = Launchpad.login_with('hello-world', 'production')
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 539, in login_with
    credential_save_failed, version)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/launchpad.py", line 346, in _authorize_token_and_login
    credentials = authorization_engine(credentials, credential_store)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 497, in __call__
    credential_store.save(credentials, self.unique_consumer_id)
  File "/usr/lib/python2.7/dist-packages/launchpadlib/credentials.py", line 253, in save
    raise e
TypeError: Expected a string or unicode object

Did I miss a setup step somewhere that is causing this error?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu python-launchpadlib Edit question
Assignee:
No assignee Edit question
Solved by:
Stacey Johnson
Solved:
Last query:
Last reply:
Revision history for this message
Stacey Johnson (sjohnson-w) said :
#1

The problem was that the keyring package I had was old. After removing the old package and installing the new keyring package (v3.3) my application was able to run successfully.