【问题标题】:Python Keyring throws error "OSError: [WinError 8] Not enough memory resources are available to process this command"Python Keyring 抛出错误“OSError:[WinError 8] 没有足够的内存资源可用于处理此命令”
【发布时间】:2021-11-08 14:57:24
【问题描述】:

我使用的是 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,同样的问题仍然存在

【问题讨论】:

    标签: python python-3.x pywin32 python-keyring


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2021-04-20
      • 1970-01-01
      • 2019-11-14
      • 1970-01-01
      • 2012-05-14
      • 1970-01-01
      • 2021-09-30
      • 2020-05-29
      • 2019-05-09
      相关资源
      最近更新 更多