python - Ubuntu 中的 Secret.Service 超时

标签 python ubuntu glib

我在 Ubuntu 16.04 中运行 Python 脚本时遇到这个错误:

GLib.Error: g-io-error-quark: Error calling StartServiceByName for org.freedesktop.secrets: 
Timeout was reached (24)

代码:

import gi
gi.require_version('Secret', '1')
from gi.repository import Secret

flags = Secret.ServiceFlags.LOAD_COLLECTIONS
service = Secret.Service.get_sync(flags)

最佳答案

自己回答。

这是与 key 环相关的问题,因此当您通过 SSH 调用服务时会发生这种情况。

关于python - Ubuntu 中的 Secret.Service 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55006539/

相关文章:

python - 检查正定性或半正定性

Python Opencv Ubuntu 不创建 Windows

php - 使用 PHP 将 URL 变量传递给 exec()

ubuntu - 为 glib-networking 开发包安装什么

javascript - 在 JavaScript 中创建动态重新调度 GSource

python - Pytorch中位数 - 这是错误还是我使用错误

javascript - 如何将 JavaScript 变量值保存在文本文件中?

python - 使用 PIL 从 macbook isight 捕获帧

java - 删除root后如何访问部署在Tomcat Docker Container中的War File Build

c - 如何在 glib 中设置日志级别