安装后我遇到了 python 密钥环的问题。这是我的步骤:
$ python
>>> import keyring
>>> keyring.set_password('something','otherSomething','lotOfMoreSomethings')
然后抛出这个:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/keyring/core.py", line 42, in set_password
_keyring_backend.set_password(service_name, username, password)
File "/usr/local/lib/python2.6/dist-packages/keyring/backend.py", line 222, in set_password
_, session = service_iface.OpenSession("plain", "")
File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 68, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/pymodules/python2.6/dbus/proxies.py", line 140, in __call__
**keywords)
File "/usr/lib/pymodules/python2.6/dbus/connection.py", line 630, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod:
Method "OpenSession" with signature "ss" on interface "org.freedesktop.Secret.Service"
doesn't exist
我已经从这里安装了钥匙圈
easy_install keyring
我做错什么了吗??有什么解决办法??
编辑:
我还从 repos 安装了 python-keyring 和 python-keyring-gnome 并像导入
>>> import gnome_keyring
和作品。