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

Can't self update to latest preview 1.2.0a2 (missing sha256sum) #4343

Closed
3 tasks done
staticdev opened this issue Aug 2, 2021 · 10 comments
Closed
3 tasks done

Can't self update to latest preview 1.2.0a2 (missing sha256sum) #4343

staticdev opened this issue Aug 2, 2021 · 10 comments
Labels
kind/bug Something isn't working as expected

Comments

@staticdev
Copy link

  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option).
  • OS version and name: Debian 11
  • Poetry version: 1.1.7
  • Link of a Gist with the contents of your pyproject.toml file: N/A

Issue

poetry --version
Poetry version 1.1.7
poetry self update --preview
Updating to 1.2.0a2

  RuntimeError

  Could not find poetry-1.2.0a2-linux.sha256sum file

  at ~/.poetry/lib/poetry/console/commands/self/update.py:260 in _update
      256│         try:
      257│             r = urlopen(base_url + "/{}/{}".format(version, checksum))
      258│         except HTTPError as e:
      259│             if e.code == 404:
    → 260│                 raise RuntimeError("Could not find {} file".format(checksum))
      261│
      262│             raise
      263│
      264│         checksum = r.read().decode().strip()
@staticdev staticdev added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Aug 2, 2021
@fredrikaverpil
Copy link
Contributor

fredrikaverpil commented Aug 2, 2021

The full URL giving the 404 is https://github.com/python-poetry/poetry/releases/download/1.2.0a2/poetry-1.2.0a2-linux.sha256sum

It seems like whomever did the release forgot to generate and upload these checksum files onto GitHub as part of the release files (also called "assets").

unknown.png

@sdispater @stephsamson do you know who made the release?

@sdispater
Copy link
Member

If you installed Poetry with the get-poetry.py script you can't and won't be able to upgrade to any 1.2 releases.

The release process has changed and has been simplified that's why we recommend to use the install-poetry.py script.

See https://python-poetry.org/docs/#installation and https://python-poetry.org/docs/master/#installation for more information about this transition and how to use the new installation script.

@staticdev
Copy link
Author

@sdispater this is not the case.. I installed using install-poetry.py script.

@sdispater
Copy link
Member

@staticdev

~/.poetry/lib/ is not the path where Poetry is installed with the install-poetry.py script, only with the get-poetry.py script.

So it seems that your are still using a Poetry version installed with the get-poetry.py script somehow.

@staticdev
Copy link
Author

@sdispater this is a bit strange, since I use the ansible-role I developed to install it, and you can check in the code it uses install-poetry.py: https://github.com/staticdev/ansible-role-python-developer/blob/main/tasks/main.yml#L59

Anyhow.. doesn't this error have something to do with the missing poetry-1.2.0a2-linux.sha256sum as mentioned by @fredrikaverpil?

@emilhe
Copy link

emilhe commented Aug 3, 2021

I have the same problem after installing with the install-poetry.py script (i also tried with the get-poetry.py just for cakes, same error).

EDIT: I just removed poetry completely and installed again via the install-poetry.py script, and now it works. I am not sure what changed.

@fredrikaverpil
Copy link
Contributor

@emilhe @staticdev I think this is what @sdispater meant. You probably have to uninstall poetry altogether, and then reinstall using the new install-poetry.py.

@sdispater can you confirm this is the case, and I could maybe add this nuance into the docs via a PR.

Then this line in the docs (README.md and docs/_index.md) could be updated to e.g. say "The previous get-poetry.py installer is now deprecated. If you are currently using it you should uninstall poetry and reinstall it using the new, supported, install-poetry.py installer.".

@Kreshu
Copy link

Kreshu commented Aug 3, 2021

I confirm, removing old installation with get-poetry.py --uninstall and installing with new script solves the issue.

@staticdev
Copy link
Author

You are right, I made a confusion. I installed poetry in two machines and the one I got this error was with get-poetry.py.

Copy link

github-actions bot commented Mar 2, 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 2, 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
Projects
None yet
Development

No branches or pull requests

6 participants