The Wayback Machine - https://web.archive.org/web/20230407180017/https://github.com/microsoft/debugpy/issues/1246
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

Unable to install debugpy using poetry v1.4.1 #1246

Closed
steve-marmalade opened this issue Mar 19, 2023 · 25 comments
Closed

Unable to install debugpy using poetry v1.4.1 #1246

steve-marmalade opened this issue Mar 19, 2023 · 25 comments
Assignees
Labels
bug Something isn't working P1

Comments

@steve-marmalade
Copy link

steve-marmalade commented Mar 19, 2023 •

Before creating a new issue, please check the FAQ to see if your question is answered there.

Environment data

  • debugpy version: 1.6.6
  • OS and version: Arch Linux 6.2.6-arch1-1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.1
  • Using VS Code or Visual Studio: No

Actual behavior

Running poetry add debugpy crashes with a _WheelFileValidationError

Expected behavior

It installs successfully, just as it does with pip install debugpy

Steps to reproduce:

  1. Install Poetry v1.4.1 (I used the pipx method)
  2. mkdir poetry-test && cd poetry-test
  3. poetry init
  4. poetry add debugpy

Given that this issue is present when installing via poetry but not pip, I initially created the issue in python-poetry/poetry#7686, but the maintainers have directed me to open an issue here to investigate the invalid wheel.

@twam
Copy link

twam commented Mar 20, 2023

Same issue here on macOS 13.2.1 with Python 3.11.2.

@nrontsis
Copy link

nrontsis commented Mar 20, 2023 •

Same issue when running poetry in a Docker environment (latest python:3.11-slim)

@jaidisido
Copy link

Same issue on AWS arm64 docker python3.9 image

@piiq
Copy link

piiq commented Mar 20, 2023

Working on an m1 macbook.

It seems that poetry 1.4.1 that was released yesterday introduced a couple of regressions. The one mentioned in this issue (_WheelValidationError) and inability to install some packages with a correct md5 wheel hash.

Downgrading poetry to 1.4.0 made the errors go away for me. Hope this helps.

@DanInacio
Copy link

DanInacio commented Mar 20, 2023 •

Had the same issue when installing torch in a Python3.8 environment on a Remote Runner via Github Actions.
Can confirm downgrading Poetry to v1.4.0 solved the problem.

@hr-curtissimo
Copy link

hr-curtissimo commented Mar 20, 2023 •

Confirm that it happens in the following with all versions of Python 3.9+:

  • Windows 11 with poetry 1.4.1
  • macOS 12.6.3, 13.2.1 with poetry 1.4.1
  • Debian Bullseye with poetry 1.4.1
In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp39-win_amd64.pyd didn't match RECORD

In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.cp39-win_amd64.pyd didn't match RECORD

In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll didn't match RECORD

In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll didn't match RECORD

In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe didn't match RECORD

In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe didn't match RECORD

In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll didn't match RECORD

In /.../.cache/poetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl,
hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll didn't match RECORD
@gazorby
Copy link

gazorby commented Mar 20, 2023 •

The workaround when using poetry 1.4.1 is to set installer.modern-installation setting to false

mtucker added a commit to mtucker/langchain that referenced this issue Mar 20, 2023
When following the Quick Start instructions in the contributing docs, I was getting a "WheelFileValidationError" on installation of debugpy
which was blocking the installation of a number of other deps. Google turned up this [GitHub issue](microsoft/debugpy#1246)
indicating a regression in Poetry 1.4.1 and workarounds.
mtucker added a commit to mtucker/langchain that referenced this issue Mar 20, 2023
When following the Quick Start instructions in the contributing docs, I was getting a "WheelFileValidationError" on installation of debugpy
which was blocking the installation of a number of other deps. Google turned up this [GitHub issue](microsoft/debugpy#1246)
indicating a regression in Poetry 1.4.1 and workarounds.
mtucker added a commit to mtucker/langchain that referenced this issue Mar 20, 2023
When following the Quick Start instructions in the contributing docs, I was getting a "WheelFileValidationError" on installation of debugpy
which was blocking the installation of a number of other deps. Google turned up this [GitHub issue](microsoft/debugpy#1246)
indicating a regression in Poetry 1.4.1 and workarounds.
mtucker added a commit to mtucker/langchain that referenced this issue Mar 20, 2023
When following the Quick Start instructions in the contributing docs, I was getting a "WheelFileValidationError" on installation of debugpy
which was blocking the installation of a number of other deps. Google turned up this [GitHub issue](microsoft/debugpy#1246)
indicating a regression in Poetry 1.4.1 and workarounds.
mtucker added a commit to mtucker/langchain that referenced this issue Mar 20, 2023
When following the Quick Start instructions in the contributing docs, I was getting a "WheelFileValidationError" on installation of debugpy
which was blocking the installation of a number of other deps. Google turned up this [GitHub issue](microsoft/debugpy#1246)
indicating a regression in Poetry 1.4.1 and workarounds.
hwchase17 pushed a commit to hwchase17/langchain that referenced this issue Mar 21, 2023
When following the Quick Start instructions in the contributing docs, I
was getting a "WheelFileValidationError" on installation of debugpy
which was blocking the installation of a number of other deps. Google
turned up this [GitHub
issue](microsoft/debugpy#1246) indicating a
regression in Poetry 1.4.1 and workarounds.

This PR updates the contrib docs noting the issue and the workarounds.
@yash2tailorbird
Copy link

The workaround when using poetry 1.4.1 is to set installer.modern-installation setting to false

it worked. thanks !

@Topchaniuk
Copy link

installer.modern-installation - where I can find this setting? Is it in VS Code settings or poetry?

@lifehackett
Copy link

installer.modern-installation - where I can find this setting? Is it in VS Code settings or poetry?

poetry config installer.modern-installation false

@yash2tailorbird
Copy link

installer.modern-installation - where I can find this setting? Is it in VS Code settings or poetry?

RUN poetry config installer.modern-installation false in your terminal

@Topchaniuk
Copy link

@yash2tailorbird that helped, thank you!

@ekeric13
Copy link

Is it better practice to set installer.modern-installation or to just downgrade to poetry 1.4.1 until the issue is fixed?

@SH2282000
Copy link

Downgrading to 1.4.0 worked for me.

Here's the command:

poetry self update 1.4.0
delfanbaum added a commit to oreillymedia/jupyter-book-to-htmlbook that referenced this issue Mar 24, 2023
This is an attempt to solve recently failing builds. Solution borrowed
from:

microsoft/debugpy#1246
delfanbaum added a commit to oreillymedia/jupyter-book-to-htmlbook that referenced this issue Mar 24, 2023
This is an attempt to solve recently failing builds. Solution borrowed
from:

microsoft/debugpy#1246
delfanbaum added a commit to oreillymedia/jupyter-book-to-htmlbook that referenced this issue Mar 24, 2023
This is an attempt to solve recently failing builds. Solution borrowed
from:

microsoft/debugpy#1246
delfanbaum added a commit to oreillymedia/jupyter-book-to-htmlbook that referenced this issue Mar 24, 2023
This is an attempt to solve recently failing builds. Solution borrowed
from:

microsoft/debugpy#1246

Update: fix syntax
@onuralpszr
Copy link

Is it better practice to set installer.modern-installation or to just downgrade to poetry 1.4.1 until the issue is fixed?

For the first part it is not good practive. Secondly If you really need latest version of debugpy via poetry you can downgrade or just turn off certain setting, but that does not the fix actual problem.

@scholarazwa
Copy link

Same issue. Tried to install jupyterlab and it stops at installing debugpy:

 • Installing debugpy (1.6.6): Failed

  _WheelFileValidationError

  ["In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp39-win_amd64.pyd didn't match RECORD", "In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.cp39-win_amd64.pyd didn't match RECORD", "In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll didn't match RECORD", "In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll didn't match RECORD", "In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe didn't match RECORD", "In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe didn't match RECORD", "In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll didn't match RECORD", "In /Users/scholarazwa/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll didn't match RECORD"]

  at ~/Library/Application Support/pypoetry/venv/lib/python3.11/site-packages/installer/sources.py:289 in validate_record
      285│                         f"In {self._zipfile.filename}, hash / size of {item.filename} didn't match RECORD"
      286│                     )
      287│ 
      288│         if issues:
    → 289│             raise _WheelFileValidationError(issues)
      290│ 
      291│     def get_contents(self) -> Iterator[WheelContentElement]:
      292│         """Sequential access to all contents of the wheel (including dist-info files).
      293│ 


@fredrikaverpil
Copy link

fredrikaverpil commented Mar 29, 2023 •

For anyone using poetry with GitHub Actions:

- run: echo "POETRY_VERSION=$(poetry --version)" >> $GITHUB_ENV
  shell: bash

- run: poetry config installer.modern-installation false
  # workaround for bug: https://github.com/microsoft/debugpy/issues/1246
  if: ${{ contains(env.POETRY_VERSION, '1.4.1') }}
  shell: bash
@steve-marmalade
Copy link
Author

While the workarounds are useful to unblock end-users in the short-run, have the maintainers of this repo confirmed whether the debugpy wheel is indeed invalid and, if so, scoped the work to resolve it?

@int19h
Copy link
Collaborator

int19h commented Mar 29, 2023

The files affected are all Win32 binaries that undergo signing in the process of building the official wheels, and need to be re-hashed after that. It seems that this process is broken currently. This is definitely a high-priority issue, and we're investigating.

@elqurio
Copy link

elqurio commented Apr 3, 2023

Works with the new v1.4.2 poetry

@marmig0404
Copy link

Works with the new v1.4.2 poetry

But with a warning, per poetry's release notes:

When trying to install wheels with invalid RECORD files, Poetry does not fail anymore but only prints a warning.

@int19h
Copy link
Collaborator

int19h commented Apr 3, 2023

Root cause has been identified; a new build of debugpy with fixed hashes is coming shortly.

@tianhuil
Copy link

tianhuil commented Apr 4, 2023

Thank you @int19h !

@drorata
Copy link

drorata commented Apr 5, 2023

Works with the new v1.4.2 poetry

For me it doesn't work. I have to configure poetry config installer.modern-installation false first. Otherwise, I still get the error:

_WheelFileValidationError

  ["In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython.cp39-win_amd64.pyd didn't match RECORD", "In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.cp39-win_amd64.pyd didn't match RECORD", "In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_amd64.dll didn't match RECORD", "In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/attach_x86.dll didn't match RECORD", "In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_amd64.exe didn't match RECORD", "In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/inject_dll_x86.exe didn't match RECORD", "In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_amd64.dll didn't match RECORD", "In /Users/fooboo/Library/Caches/pypoetry/artifacts/2e/09/48/001b624046a68d08cdbd434b4da9011c6d44fd1c83f9155679a8edad00/debugpy-1.6.6-py2.py3-none-any.whl, hash / size of debugpy/_vendored/pydevd/pydevd_attach_to_process/run_code_on_dllmain_x86.dll didn't match RECORD"]
@int19h
Copy link
Collaborator

int19h commented Apr 5, 2023

debugpy 1.6.7 is now up on PyPI and should fix this problem. Please let me know if there are any issues.

@int19h int19h closed this as completed Apr 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1