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

Install with Poetry fails with: 'Link' object has no attribute 'name' #2133

Closed
ingvaldlorentzen opened this issue Nov 16, 2021 · 3 comments
Closed

Comments

@ingvaldlorentzen
Copy link

ingvaldlorentzen commented Nov 16, 2021

Outline

When trying to install click with poetry it fails with the following error:

• Installing click (8.0.3): Failed
  AttributeError
  'Link' object has no attribute 'name'
  at /usr/local/Cellar/poetry/1.1.11/libexec/lib/python3.9/site-packages/poetry/installation/executor.py:632 in _download_link
      628│                 raise RuntimeError(
      629│                     "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
      630│                         ", ".join(sorted(archive_hashes)),
      631│                         package,
    → 632│                         archive.name,
      633│                         ", ".join(sorted(hashes)),
      634│                     )
      635│                 )
      636│ 

I guess this could be an issue with Poetry, but it doesn't seem like it. Seems like click is missing some information in the package that Poetry expects? Install with pip works fine.

Replicate

  1. Install Poetry (or simply, brew install poetry on macOS if you have Homebrew).
  2. In a virtual environment, run poetry add click

Expected Behaviour

Click should be installed without issues.

Environment: macOS

  • Python version: 3.9
  • Click version: 8.0.3
@davidism
Copy link
Member

davidism commented Nov 16, 2021

This sounds like an issue with Poetry. Please report it to them.

I know nothing about how Poetry works or why archive might not have name in its internals. If it is indeed an issue with Click, I need precise instructions on what needs to be changed.

@davidism
Copy link
Member

I searched poetry's issue tracker for "archive name" and immediately found this: python-poetry/poetry#4701

@ingvaldlorentzen
Copy link
Author

I was searching around in the Poetry issues before submitting this, but didn't find that issue 🤦‍♂️

Seems like Poetry caches some stuff that isn't cleared with the poetry cache command.
Removing ~/Library/Caches/pypoetry did the trick on macOS.

Sorry for the incorrect issue, and thanks for the help!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants