using python keyring module results in authentication error

Lucien Pullen drurowin at gmail.com
Sat Oct 12 06:53:34 BST 2013


Given this pythonfile

=====BEGIN PYTHON FILE=====
#!/usr/bin/python

import keyring
======END PYTHON FILE======

and this excerpt from the .offlineimaprc

  remotepass = keyring.get_password("imap.example.com", "account")

results in the error "[AUTHENTICATIONFAILED] Invalid credentials".

The keyring.get_password() function returns strings in the form of
"u'thepassword'".  Using the return value directly also results in an
error.  I don't know python, so I don't know what's going wrong here,
but it seems to be that "u'thepassword'" isn't the same as "thepassword"
in config files.




More information about the OfflineIMAP-project mailing list