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

Cannot update to latest pre-release due to missing sha256sum file #5025

Closed
3 tasks done
ashnair1 opened this issue Jan 11, 2022 · 7 comments
Closed
3 tasks done

Cannot update to latest pre-release due to missing sha256sum file #5025

ashnair1 opened this issue Jan 11, 2022 · 7 comments
Labels
kind/bug Something isn't working as expected

Comments

@ashnair1
Copy link
Contributor

ashnair1 commented Jan 11, 2022

  • 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: Ubuntu 18.04
  • Poetry version: 1.1.12

Issue

Updating to the latest pre-release fails due to missing sha256sum file

poetry self update -vvv --preview
Updating to 1.2.0a2

  Stack trace:

  6  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/console_application.py:131 in run
      129│             parsed_args = resolved_command.args
      130│ 
    → 131│             status_code = command.handle(parsed_args, io)
      132│         except KeyboardInterrupt:
      133│             status_code = 1

  5  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py:120 in handle
      118│     def handle(self, args, io):  # type: (Args, IO) -> int
      119│         try:
    → 120│             status_code = self._do_handle(args, io)
      121│         except KeyboardInterrupt:
      122│             if io.is_debug():

  4  ~/.poetry/lib/poetry/_vendor/py3.7/clikit/api/command/command.py:171 in _do_handle
      169│         handler_method = self._config.handler_method
      170│ 
    → 171│         return getattr(handler, handler_method)(args, io, self)
      172│ 
      173│     def __repr__(self):  # type: () -> str

  3  ~/.poetry/lib/poetry/_vendor/py3.7/cleo/commands/command.py:92 in wrap_handle
       90│         self._command = command
       91│ 
    →  92│         return self.handle()
       93│ 
       94│     def handle(self):  # type: () -> Optional[int]

  2  ~/.poetry/lib/poetry/console/commands/self/update.py:197 in handle
      195│             return self.update_with_new_method(release.version)
      196│ 
    → 197│         self.update(release)
      198│ 
      199│     def update(self, release):

  1  ~/.poetry/lib/poetry/console/commands/self/update.py:212 in update
      210│ 
      211│         try:
    → 212│             self._update(version)
      213│         except Exception:
      214│             if not self.lib_backup.exists():

  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()
@ashnair1 ashnair1 added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Jan 11, 2022
@finswimmer
Copy link
Member

Hello @ashnair1,

you cannot update to the latest pre-release version if you've installed poetry with the deprecated get-poetry.py script. Please uninstall the current poetry version with the get-poetry.py Script and reinstall it with the install-poetry.py script.

fin swimmer

@igorMIA
Copy link

igorMIA commented Apr 5, 2022

Thanks! Worked on MacOS 12.3 also.

@gkapfham
Copy link

Hello @finswimmer and @igorMIA, I would like to upgrade Poetry to the preview version and I have followed the instructions mentioned here to ensure that I have the newest version of Poetry available that was installed through the new script.

However, I still end up with an error like the one that was originally mentioned in this issue. While I recognize that this issue is now closed, I'm wondering if I could trouble you to point me in the right direction for what step I can next take to resolve this problem? While I recognize you are all busy, I would appreciate any help that you can provide.

  • Since I have been using Poetry with the previous installation script I type curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --uninstall to uninstall it
  • When I type the command which poetry, it outputs poetry not found
  • When I type the command which python it output /home/gkapfham/.asdf/shims/python
  • Please note that I am managing my Python installations with asdf which, as I recall, uses pyenv internally
  • When I type python --version I see the following output: Python 3.10.5
  • I then run the command curl -sSL https://install.python-poetry.org | python3 - and I see this output
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/home/gkapfham/.poetry/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.1.14): Done

Poetry (1.1.14) is installed now. Great!

You can test that everything is set up by executing:

`poetry --version`

Now when I type poetry --version I see the following output: Poetry version 1.1.14.

However, when I type the command poetry self update --preview I see the following output:

Updating to 1.2.0b3

  RuntimeError

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

  at .poetry/venv/lib/python3.10/site-packages/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()

which is similar to the error that @ashnair1 originally posted.

Is there something that I am overlooking and doing wrong? Can you please help me to use the preview version of Poetry and then use the following approach to switch Poetry between different versions of Python?

#4101

Again, thanks for any insights that you can provide!

@zlenyk
Copy link

zlenyk commented Jul 20, 2022

Hi @gkapfham , I'm hitting the same issue. I managed to workaround it via downloading manually the .whl file:

wget https://github.com/python-poetry/poetry/releases/download/1.2.0b3/poetry-1.2.0b3-py3-none-any.whl

and the installing it with pip. I know it's far from official solution, but maybe will unblock you.

@nurakawa
Copy link

nurakawa commented Jan 9, 2023

Hello @ashnair1,

you cannot update to the latest pre-release version if you've installed poetry with the deprecated get-poetry.py script. Please uninstall the current poetry version with the get-poetry.py Script and reinstall it with the install-poetry.py script.

fin swimmer

This worked for me !
An additional step that was needed after running curl -sSL https://install.python-poetry.org | python3 - --uninstall was to manually remove the directory where poetry was installed. The directory can be found with the command which poetry and removed with rm -r <path/to/poetry>.

@jonathandean
Copy link

Since get-poetry.py is no longer in the master branch you will need to uninstall with this url now:

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/d222411ae9d01a04ec8eda348a65aa83852c37d0/get-poetry.py | python3 - --uninstall

Then I was able to install again using the current method in the docs

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
kind/bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

8 participants