运行到密钥环问题:运行时错误:无法初始化 SecretService:环境变量 DBUS_SESSION_BUS_ADDRESS 未设置SecretService 已安装。操作系统是 RHEL运行: python -c "import keyring.backends.SecretService as SS; SS.Keyring.priority"提供了以下错误:回溯(最近通话最后一个):文件“/home/webpage/.pyenv/versions/WEBPAGE/lib/python3.6/site-packages/secretstorage/初始化py”为41行,在dbus_init回报connect_and_authenticate() 文件“/home/webpage/.pyenv/versions/WEBPAGE/lib/python3.6/site-packages/jeepney/integrate/blocking.py”,第 70 行,connect_and_authenticate bus_addr = get_bus(bus) 文件“/ home/webpage/.pyenv/versions/WEBPAGE/lib/python3.6/site-packages/jeepney/bus.py", line 53, in get_bus return find_session_bus() File "/home/webpage/.pyenv/versions/WEBPAGE /lib/python3.6/site-packages/jeepney/bus.py”,第 42 行,在 find_session_bus addr = os.environ['DBUS_SESSION_BUS_ADDRESS'] 文件“/home/webpage/.pyenv/versions/3.6.5/lib /python3.6/os.py",第 669 行,在getitem 中 从 None KeyError 引发 KeyError(key): 'DBUS_SESSION_BUS_ADDRESS'上述异常是以下异常的直接原因:回溯(最近一次通话):文件“/home/webpage/.pyenv/versions/WEBPAGE/lib/python3.6/site-packages/keyring/backends/SecretService.py”,第 37 行,在优先级总线 = secretstorage 中。 dbus_init()文件“/home/webpage/.pyenv/versions/WEBPAGE/lib/python3.6/site-packages/secretstorage/初始化从EX secretstorage.exceptions py”为45行,在dbus_init提高SecretServiceNotAvailableException(原因)。 SecretServiceNotAvailableException:环境变量 DBUS_SESSION_BUS_ADDRESS 未设置在处理上述异常的过程中,又发生了一个异常:回溯(最近一次调用):文件“”,第 1 行,在文件“/home/webpage/.pyenv/versions/WEBPAGE/lib/python3.6/site-packages/keyring/util/properties.py”中,行26、在get中 返回self.fget。get (None, owner)() File "/home/webpage/.pyenv/versions/WEBPAGE/lib/python3.6/site-packages/keyring/backends/SecretService.py", line 41, in priority "Unable to initialize SecretService:%s" % e) 运行时错误:无法初始化 SecretService:环境变量 DBUS_SESSION_BUS_ADDRESS 未设置任何帮助表示赞赏!
添加回答
举报
0/150
提交
取消