Search code examples
pythonpython-poetry

Poetry error on install - SecretStorage required


I'm trying to execute poetry install, but I got errors

Cannot install pyasn1.
  RuntimeError
  SecretStorage required

And when I try to poetry add SecretStorage, I got the same SecretStorage required

What should I do to fix that?

(Python version - 3.11, operating system - Macos)


Solution

  • Answer is based on source: https://github.com/orgs/python-poetry/discussions/7119#discussioncomment-4394623

    It wasn't necessarily SecretStorage causing the received error, it was that python-keychain was looking for SecretStorage to be configured and implemented, when it was not. A few weeks ago, I attempted to implement secretservice for another application, but abandoned the implementation. I knew there was a modified configuration file somewhere on my system that was configured to use the now defunct secretservice implementation, but since I never received any sign specifically pointing to this misconfigured file, I assumed it wasn't a concern. When all along, poetry was pointing right at the issue, in it's own way.

    ~/.config/python-keyring/keyringer.cfg was the file in question that was modified to use the defunct secretservice implementation. I simply exchanged default-keyring=keyring.backends.secretservice.Keyring for default-keyring=keyring.backends.null.Keyring. Immediately after which, poetry ceased output of the error, and is back to working fantastically.