0

我正在使用 python 3.10,并且以下代码在启动后运行一次,但是如果我尝试为密钥环设置任何新密码,则会引发以下错误。

import keyring
keyring.set_password("test","a","b")



Traceback (most recent call last):
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
    yield
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\win32ctypes\pywin32\win32cred.py", line 37, in CredWrite
    _authentication._CredWrite(c_pcreds, 0)
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\win32ctypes\core\cffi\_authentication.py", line 152, in _CredWrite
    return check_zero(
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\win32ctypes\core\cffi\_util.py", line 81, in __call__
    self._raise_error(function_name)
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\win32ctypes\core\cffi\_util.py", line 92, in _raise_error
    raise exception
OSError: [WinError 8] Not enough memory resources are available to process this command

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Directive Athena\Projects\A.D.A.M\Packages\Athena_Encryption\Encryption.py", line 2, in <module>
    keyring.set_password("test","a","b")
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\keyring\core.py", line 60, in set_password
    get_keyring().set_password(service_name, username, password)
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\keyring\backends\Windows.py", line 131, in set_password
    self._set_password(service, username, str(password))
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\keyring\backends\Windows.py", line 142, in _set_password
    win32cred.CredWrite(credential, 0)
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\win32ctypes\pywin32\win32cred.py", line 36, in CredWrite
    with _pywin32error():
  File "C:\Program Files\Python310\lib\contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "D:\Directive Athena\Projects\A.D.A.M\PyVenv\venv\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
    raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (8, 'CredWrite', 'Not enough memory resources are available to process this command')

Process finished with exit code 1

我已经尝试重新启动我的电脑,并且如上所述,它只想要执行一次,之后如果我尝试设置一个新密钥,它就会失败。重新安装python,回到3.9,同样的问题仍然存在

4

1 回答 1

0

发现问题出在哪里... Windows 凭据管理器由 adobe 密钥填充,没有明显的原因... 从较旧的 python 程序中删除一些较旧的密钥解决了这个问题,因为现在管理器中有空间释放。在我们发言时向 adobe 提交错误报告

于 2021-11-08T16:11:55.970 回答