0

I'm using python 3.10 and the following code works once after startup, but then if I try and set any new password to the keyring, the following errors are thrown.

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

I have tried restarting my pc, and as mentioned this then only wants execute once, after which it fails if I try and set a new key. Reinstalled python, and went back to 3.9, same issues persist

1 Answer 1

0

Found what the issue was... the windows credential manager is filled by adobe keys, for no apparent reason... Deleting some older keys from older python programs resolved the issue as there is now space freed up in the manager. Filing a bug report to adobe as we speak

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.