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

Poetry fails to install any private package from Nexus #7515

Closed
4 tasks done
lokeshjain279 opened this issue Feb 15, 2023 · 2 comments
Closed
4 tasks done

Poetry fails to install any private package from Nexus #7515

lokeshjain279 opened this issue Feb 15, 2023 · 2 comments
Labels
status/duplicate Duplicate issues

Comments

@lokeshjain279
Copy link

lokeshjain279 commented Feb 15, 2023

  • Poetry version: --> 1.3.2

  • Python version: --> 3.9.6

  • OS version and name: --> MacOs Ventura 13.1

  • Nexus Version: --> 3.30.0

  • pyproject.toml: --> https://gist.github.com/lokeshjain279/36148910af76979ebc39c6f20a133103

  • 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

poetry fails to install any of the private packages from the Nexus. I am using the latest poetry version and nexus version is 3.30.0. This is the error I am getting -

Stack trace:

  7  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:263 in _execute_operation
      261│ 
      262│             try:
    → 263│                 result = self._do_execute_operation(operation)
      264│             except EnvCommandError as e:
      265│                 if e.e.returncode == -2:

  6  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:334 in _do_execute_operation
      332│             return 0
      333│ 
    → 334│         result: int = getattr(self, f"_execute_{method}")(operation)
      335│ 
      336│         if result != 0:

  5  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:461 in _execute_update
      459│ 
      460│     def _execute_update(self, operation: Install | Update) -> int:
    → 461│         status_code = self._update(operation)
      462│ 
      463│         self._save_url_reference(operation)

  4  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:499 in _update
      497│ 
      498│     def _update(self, operation: Install | Update) -> int:
    → 499│         return self._install(operation)
      500│ 
      501│     def _remove(self, operation: Uninstall) -> int:

  3  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:488 in _install
      486│             archive = self._download_link(operation, Link(package.source_url))
      487│         else:
    → 488│             archive = self._download(operation)
      489│ 
      490│         operation_message = self.get_operation_message(operation)

  2  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/executor.py:626 in _download
      624│ 
      625│     def _download(self, operation: Install | Update) -> Path:
    → 626│         link = self._chooser.choose_for(operation.package)
      627│ 
      628│         if link.yanked:

  1  ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/chooser.py:79 in choose_for
       77│         """
       78│         links = []
    →  79│         for link in self._get_links(package):
       80│             if link.is_wheel:
       81│                 if not self._no_binary_policy.allows(package.name):

  RuntimeError

  Retrieved digest for link dal_lib-0.5.1-py3-none-any.whl(md5:a0061d1dbb16e005973f7914251a8761) not in poetry.lock metadata ['sha256:e3f4a01fc75f9b23afff40370953244ce3170cd80bb73d6fadf8fb8f190e7f3a']

  at ~/.local/pipx/venvs/poetry/lib/python3.11/site-packages/poetry/installation/chooser.py:146 in _get_links
      142│ 
      143│             selected_links.append(link)
      144│ 
      145│         if links and not selected_links:
    → 146│             raise RuntimeError(
      147│                 f"Retrieved digest for link {link.filename}({h}) not in poetry.lock"
      148│                 f" metadata {hashes}"
      149│             )
      150│ 

I have tried deleting the cache but it didn't work either. Btw I am able to install the library with pip install. Any help here would be appreciated as I am stuck on this.

@lokeshjain279 lokeshjain279 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 15, 2023
@neersighted
Copy link
Member

Duplicate #6301, update your Nexus to build sha256 hashes.

@neersighted neersighted closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2023
@neersighted neersighted added status/duplicate Duplicate issues and removed kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Feb 15, 2023
Copy link

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 Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

No branches or pull requests

2 participants