Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running Poetry install fails when running though ansible #6558

Closed
4 tasks done
myhrmans opened this issue Sep 19, 2022 · 3 comments
Closed
4 tasks done

Running Poetry install fails when running though ansible #6558

myhrmans opened this issue Sep 19, 2022 · 3 comments
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues

Comments

@myhrmans
Copy link

myhrmans commented Sep 19, 2022

  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Hi, Im trying to run the poetry install command through ansible.
For some reason it does not work as seen below:

      "Creating virtualenv test-o83ujoU_-py3.8 in /home/dd/.cache/pypoetry/virtualenvs",
      "Installing dependencies from lock file",
      "",
      "Package operations: 4 installs, 0 updates, 0 removals",
      "",
      "  • Installing paho-mqtt (1.6.1)",
      "  • Installing six (1.16.0)",
      "",
      "  DBusErrorResponse",
      "",
      "  [org.freedesktop.DBus.Error.UnknownMethod] ('No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/secrets/collection/login',)",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/secretstorage/util.py:48 in send_and_get_reply",
      "       44│     def send_and_get_reply(self, msg: Message) -> Any:",
      "       45│         try:",
      "       46│             resp_msg: Message = self._connection.send_and_get_reply(msg)",
      "       47│             if resp_msg.header.message_type == MessageType.error:",
      "    →  48│                 raise DBusErrorResponse(resp_msg)",
      "       49│             return resp_msg.body",
      "       50│         except DBusErrorResponse as resp:",
      "       51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):",
      "       52│                 raise ItemNotFoundException('Item does not exist!') from resp",
      "",
      "The following error occurred when trying to handle this error:",
      "",
      "",
      "  ItemNotFoundException",
      "",
      "  Item does not exist!",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/secretstorage/util.py:52 in send_and_get_reply",
      "       48│                 raise DBusErrorResponse(resp_msg)",
      "       49│             return resp_msg.body",
      "       50│         except DBusErrorResponse as resp:",
      "       51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):",
      "    →  52│                 raise ItemNotFoundException('Item does not exist!') from resp",
      "       53│             elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED,",
      "       54│                                DBUS_NO_REPLY):",
      "       55│                 data = resp.data",
      "       56│                 if isinstance(data, tuple):",
      "",
      "The following error occurred when trying to handle this error:",
      "",
      "",
      "  PromptDismissedException",
      "",
      "  Prompt dismissed.",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/secretstorage/collection.py:159 in create_collection",
      "      155│     if len(collection_path) > 1:",
      "      156│         return Collection(connection, collection_path, session=session)",
      "      157│     dismissed, result = exec_prompt(connection, prompt)",
      "      158│     if dismissed:",
      "    → 159│         raise PromptDismissedException('Prompt dismissed.')",
      "      160│     signature, collection_path = result",
      "      161│     assert signature == 'o'",
      "      162│     return Collection(connection, collection_path, session=session)",
      "      163│ ",
      "",
      "The following error occurred when trying to handle this error:",
      "",
      "",
      "  InitError",
      "",
      "  Failed to create the collection: Prompt dismissed..",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/keyring/backends/SecretService.py:63 in get_preferred_collection",
      "       59│                 collection = secretstorage.Collection(bus, self.preferred_collection)",
      "       60│             else:",
      "       61│                 collection = secretstorage.get_default_collection(bus)",
      "       62│         except exceptions.SecretStorageException as e:",
      "    →  63│             raise InitError(\"Failed to create the collection: %s.\" % e)",
      "       64│         if collection.is_locked():",
      "       65│             collection.unlock()",
      "       66│             if collection.is_locked():  # User dismissed the prompt",
      "       67│                 raise KeyringLocked(\"Failed to unlock the collection!\")",
      "",
      "",
      "  DBusErrorResponse",
      "",
      "  [org.freedesktop.DBus.Error.UnknownMethod] ('No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/secrets/collection/login',)",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/secretstorage/util.py:48 in send_and_get_reply",
      "       44│     def send_and_get_reply(self, msg: Message) -> Any:",
      "       45│         try:",
      "       46│             resp_msg: Message = self._connection.send_and_get_reply(msg)",
      "       47│             if resp_msg.header.message_type == MessageType.error:",
      "    →  48│                 raise DBusErrorResponse(resp_msg)",
      "       49│             return resp_msg.body",
      "       50│         except DBusErrorResponse as resp:",
      "       51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):",
      "       52│                 raise ItemNotFoundException('Item does not exist!') from resp",
      "",
      "The following error occurred when trying to handle this error:",
      "",
      "",
      "  ItemNotFoundException",
      "",
      "  Item does not exist!",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/secretstorage/util.py:52 in send_and_get_reply",
      "       48│                 raise DBusErrorResponse(resp_msg)",
      "       49│             return resp_msg.body",
      "       50│         except DBusErrorResponse as resp:",
      "       51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):",
      "    →  52│                 raise ItemNotFoundException('Item does not exist!') from resp",
      "       53│             elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED,",
      "       54│                                DBUS_NO_REPLY):",
      "       55│                 data = resp.data",
      "       56│                 if isinstance(data, tuple):",
      "",
      "The following error occurred when trying to handle this error:",
      "",
      "",
      "  PromptDismissedException",
      "",
      "  Prompt dismissed.",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/secretstorage/collection.py:159 in create_collection",
      "      155│     if len(collection_path) > 1:",
      "      156│         return Collection(connection, collection_path, session=session)",
      "      157│     dismissed, result = exec_prompt(connection, prompt)",
      "      158│     if dismissed:",
      "    → 159│         raise PromptDismissedException('Prompt dismissed.')",
      "      160│     signature, collection_path = result",
      "      161│     assert signature == 'o'",
      "      162│     return Collection(connection, collection_path, session=session)",
      "      163│ ",
      "",
      "The following error occurred when trying to handle this error:",
      "",
      "",
      "  InitError",
      "",
      "  Failed to create the collection: Prompt dismissed..",
      "",
      "  at /opt/poetry/venv/lib/python3.8/site-packages/keyring/backends/SecretService.py:63 in get_preferred_collection",
      "       59│                 collection = secretstorage.Collection(bus, self.preferred_collection)",
      "       60│             else:",
      "       61│                 collection = secretstorage.get_default_collection(bus)",
      "       62│         except exceptions.SecretStorageException as e:",
      "    →  63│             raise InitError(\"Failed to create the collection: %s.\" % e)",
      "       64│         if collection.is_locked():",
      "       65│             collection.unlock()",
      "       66│             if collection.is_locked():  # User dismissed the prompt",
      "       67│                 raise KeyringLocked(\"Failed to unlock the collection!\")"
   ]
}

Running the command directly works fine, it looks like its requiring a keyring even tho Im not trying to publish anything..

@myhrmans myhrmans added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 19, 2022
@dimbleby
Copy link
Contributor

duplicate #1917

@neersighted neersighted added status/duplicate Duplicate issues and removed status/triage This issue needs to be triaged labels Sep 20, 2022
@neersighted
Copy link
Member

Indeed a duplicate

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Sep 20, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working as expected status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

3 participants