ConfigParser.NoOptionError: No option 'consumer_key' in section: '1'

Bug #758460 reported by Martin Pool
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpadlib
New
Undecided
Unassigned

Bug Description

After logging in for the first time with Launchpadlib on a particular machine on natty, a second use of it fails as follows:

% ./traceback-into-bug-description 748801
Traceback (most recent call last):
  File "./traceback-into-bug-description", line 6, in <module>
    'https://api.launchpad.net/')
  File "/usr/lib/pymodules/python2.7/launchpadlib/launchpad.py", line 538, in login_with
    credential_save_failed, version)
  File "/usr/lib/pymodules/python2.7/launchpadlib/launchpad.py", line 341, in _authorize_token_and_login
    authorization_engine.unique_consumer_id)
  File "/usr/lib/pymodules/python2.7/launchpadlib/credentials.py", line 273, in load
    return self.do_load(unique_key)
  File "/usr/lib/pymodules/python2.7/launchpadlib/credentials.py", line 322, in do_load
    return Credentials.from_string(credential_string)
  File "/usr/lib/pymodules/python2.7/launchpadlib/credentials.py", line 89, in from_string
    credentials.load(StringIO(value))
  File "/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.py", line 165, in load
    CREDENTIALS_FILE_VERSION, 'consumer_key')
  File "/usr/lib/python2.7/ConfigParser.py", line 610, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'consumer_key' in section: '1'

I don't know yet which file it's looking in.

Revision history for this message
Martin Pool (mbp) wrote :

credentials.py line 322 is in the KeyringCredentialStore, so I guess that launchpadlib has written something in there that it cannot read back?

I can see it's written a new entry whose description is just "network password" and the "password" field of it is just "
the 3-byte string "[1]". That is not actually my password. From looking at the code I guess it's meant to be a ConfigParser ini-style file, but for some reason it isn't.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.