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 1.1.12 : can't install flask-admin #4840

Closed
3 tasks done
rachmadaniHaryono opened this issue Nov 28, 2021 · 15 comments
Closed
3 tasks done

poetry 1.1.12 : can't install flask-admin #4840

rachmadaniHaryono opened this issue Nov 28, 2021 · 15 comments
Labels
kind/bug Something isn't working as expected

Comments

@rachmadaniHaryono
Copy link

rachmadaniHaryono commented Nov 28, 2021

  • 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 21.10

  • Poetry version: 1.1.12

  • Link of a Gist with the contents of your pyproject.toml file:

pyproject.toml

[tool.poetry]
name = "temp"
version = "0.1.0"
description = ""
authors = ["author <[email protected]>"]

[tool.poetry.dependencies]
python = "^3.9"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

Issue

how to reproduce

  1. create folder temp
  2. add the given pyproject.toml
  3. run poetry add poetry add flask-admin

it will raise following error

> poetry add flask-admin
Using version ^1.5.8 for Flask-Admin

Updating dependencies
Resolving dependencies... (5.7s)

Writing lock file

Package operations: 8 installs, 0 updates, 0 removals

  • Installing markupsafe (2.0.1)
  • Installing click (8.0.3)
  • Installing itsdangerous (2.0.1)
  • Installing jinja2 (3.0.3)
  • Installing werkzeug (2.0.2)
  • Installing flask (2.0.2)
  • Installing wtforms (3.0.0)
  • Installing flask-admin (1.5.8): Failed

  RuntimeError

  Invalid hashes (sha256:e7e11ee8bf67ad176dd1224c137e860f5d387357d7331fc650f0a9eef03cdc83) for flask-admin (1.5.8) using archive Flask-Admin-1.5.8.tar.gz. Expected one of sha256:eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74.

  at ~/.poetry/lib/poetry/installation/executor.py:627 in _download_link
      623│                     )
      624│                 )
      625│
      626│             if archive_hashes.isdisjoint(hashes):
    → 627│                 raise RuntimeError(
      628│                     "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
      629│                         ", ".join(sorted(archive_hashes)),
      630│                         package,
      631│                         archive_path.name,


Failed to add packages, reverting the pyproject.toml file to its original content.

if i run it with -vvv flag

> poetry add flask-admin -vvv
Using virtualenv: /home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9
PyPI: 37 packages found for flask-admin *
Using version ^1.5.8 for Flask-Admin

Updating dependencies
Resolving dependencies...
   1: fact: temp is 0.1.0
   1: derived: temp
   1: fact: temp depends on Flask-Admin (^1.5.8)
   1: selecting temp (0.1.0)
   1: derived: Flask-Admin (>=1.5.8,<2.0.0)
PyPI: 1 packages found for flask-admin >=1.5.8,<2.0.0
   1: fact: flask-admin (1.5.8) depends on Flask (>=0.7)
   1: fact: flask-admin (1.5.8) depends on wtforms (*)
   1: selecting flask-admin (1.5.8)
   1: derived: wtforms
   1: derived: Flask (>=0.7)
   1: fact: wtforms (3.0.0) depends on MarkupSafe (*)
   1: selecting wtforms (3.0.0)
   1: derived: MarkupSafe
   1: fact: flask (2.0.2) depends on Werkzeug (>=2.0)
   1: fact: flask (2.0.2) depends on Jinja2 (>=3.0)
   1: fact: flask (2.0.2) depends on itsdangerous (>=2.0)
   1: fact: flask (2.0.2) depends on click (>=7.1.2)
   1: selecting flask (2.0.2)
   1: derived: click (>=7.1.2)
   1: derived: itsdangerous (>=2.0)
   1: derived: Jinja2 (>=3.0)
   1: derived: Werkzeug (>=2.0)
   1: selecting markupsafe (2.0.1)
   1: fact: click (8.0.3) depends on colorama (*)
   1: selecting click (8.0.3)
   1: derived: colorama
   1: selecting itsdangerous (2.0.1)
   1: fact: jinja2 (3.0.3) depends on MarkupSafe (>=2.0)
   1: selecting jinja2 (3.0.3)
   1: selecting werkzeug (2.0.2)
   1: selecting colorama (0.4.4)
   1: Version solving took 0.952 seconds.
   1: Tried 1 solutions.

Finding the necessary packages for the current system

Package operations: 1 install, 0 updates, 0 removals, 8 skipped

  • Removing colorama (0.4.4): Pending...
  • Removing colorama (0.4.4): Skipped for the following reason: Not currently installed
  • Installing markupsafe (2.0.1): Pending...
  • Installing markupsafe (2.0.1): Skipped for the following reason: Already installed
  • Installing click (8.0.3): Pending...
  • Installing click (8.0.3): Skipped for the following reason: Already installed
  • Installing itsdangerous (2.0.1): Pending...
  • Installing itsdangerous (2.0.1): Skipped for the following reason: Already installed
  • Installing jinja2 (3.0.3): Pending...
  • Installing jinja2 (3.0.3): Skipped for the following reason: Already installed
  • Installing werkzeug (2.0.2): Pending...
  • Installing werkzeug (2.0.2): Skipped for the following reason: Already installed
  • Installing flask (2.0.2): Pending...
  • Installing flask (2.0.2): Skipped for the following reason: Already installed
  • Installing wtforms (3.0.0): Pending...
  • Installing wtforms (3.0.0): Skipped for the following reason: Already installed
  • Installing flask-admin (1.5.8): Pending...
  • Installing flask-admin (1.5.8): Failed

  RuntimeError

  Invalid hashes (sha256:e7e11ee8bf67ad176dd1224c137e860f5d387357d7331fc650f0a9eef03cdc83) for flask-admin (1.5.8) using archive Flask-Admin-1.5.8.tar.gz. Expected one of sha256:eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74.

  at ~/.poetry/lib/poetry/installation/executor.py:627 in _download_link
      623│                     )
      624│                 )
      625│
      626│             if archive_hashes.isdisjoint(hashes):
    → 627│                 raise RuntimeError(
      628│                     "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
      629│                         ", ".join(sorted(archive_hashes)),
      630│                         package,
      631│                         archive_path.name,


Failed to add packages, reverting the pyproject.toml file to its original content.

i tried downloading flask-admin and checking the actual hash

> poetry run pip download flask-admin==1.5.8
Collecting flask-admin==1.5.8
  Using cached Flask-Admin-1.5.8.tar.gz (6.6 MB)
  Preparing metadata (setup.py) ... done
Collecting Flask>=0.7
  Downloading Flask-2.0.2-py3-none-any.whl (95 kB)
     |████████████████████████████████| 95 kB 33 kB/s
Collecting wtforms
  Downloading WTForms-3.0.0-py3-none-any.whl (136 kB)
     |████████████████████████████████| 136 kB 570 kB/s
Collecting Werkzeug>=2.0
  Downloading Werkzeug-2.0.2-py3-none-any.whl (288 kB)
     |████████████████████████████████| 288 kB 51 kB/s
Collecting Jinja2>=3.0
  Using cached Jinja2-3.0.3-py3-none-any.whl (133 kB)
Collecting click>=7.1.2
  Using cached click-8.0.3-py3-none-any.whl (97 kB)
Collecting itsdangerous>=2.0
  Downloading itsdangerous-2.0.1-py3-none-any.whl (18 kB)
Collecting MarkupSafe
  Downloading MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (30 kB)
Saved ./Flask-Admin-1.5.8.tar.gz
Saved ./Flask-2.0.2-py3-none-any.whl
Saved ./WTForms-3.0.0-py3-none-any.whl
Saved ./click-8.0.3-py3-none-any.whl
Saved ./itsdangerous-2.0.1-py3-none-any.whl
Saved ./Jinja2-3.0.3-py3-none-any.whl
Saved ./MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Saved ./Werkzeug-2.0.2-py3-none-any.whl
> sha256sum ./Flask-Admin-1.5.8.tar.gz
eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74  ./Flask-Admin-1.5.8.tar.gz

current poetry.lock content

poetry.lock

[[package]]
name = "click"
version = "8.0.3"
description = "Composable command line interface toolkit"
category = "main"
optional = false
python-versions = ">=3.6"

[package.dependencies]
colorama = {version = "*", markers = "platform_system == \"Windows\""}

[[package]]
name = "colorama"
version = "0.4.4"
description = "Cross-platform colored terminal text."
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*"

[[package]]
name = "flask"
version = "2.0.2"
description = "A simple framework for building complex web applications."
category = "main"
optional = false
python-versions = ">=3.6"

[package.dependencies]
click = ">=7.1.2"
itsdangerous = ">=2.0"
Jinja2 = ">=3.0"
Werkzeug = ">=2.0"

[package.extras]
async = ["asgiref (>=3.2)"]
dotenv = ["python-dotenv"]

[[package]]
name = "flask-admin"
version = "1.5.8"
description = "Simple and extensible admin interface framework for Flask"
category = "main"
optional = false
python-versions = "*"

[package.dependencies]
Flask = ">=0.7"
wtforms = "*"

[package.extras]
aws = ["boto"]
azure = ["azure-storage-blob"]

[[package]]
name = "itsdangerous"
version = "2.0.1"
description = "Safely pass data to untrusted environments and back."
category = "main"
optional = false
python-versions = ">=3.6"

[[package]]
name = "jinja2"
version = "3.0.3"
description = "A very fast and expressive template engine."
category = "main"
optional = false
python-versions = ">=3.6"

[package.dependencies]
MarkupSafe = ">=2.0"

[package.extras]
i18n = ["Babel (>=2.7)"]

[[package]]
name = "markupsafe"
version = "2.0.1"
description = "Safely add untrusted strings to HTML/XML markup."
category = "main"
optional = false
python-versions = ">=3.6"

[[package]]
name = "werkzeug"
version = "2.0.2"
description = "The comprehensive WSGI web application library."
category = "main"
optional = false
python-versions = ">=3.6"

[package.extras]
watchdog = ["watchdog"]

[[package]]
name = "wtforms"
version = "3.0.0"
description = "Form validation and rendering for Python web development."
category = "main"
optional = false
python-versions = ">=3.6"

[package.dependencies]
MarkupSafe = "*"

[package.extras]
email = ["email-validator"]

[metadata]
lock-version = "1.1"
python-versions = "^3.9"
content-hash = "6f68cf983a404b258fd04f7718abd46d9d8feb332f535feaeeef677715259fb0"

[metadata.files]
click = [
    {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"},
    {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"},
]
colorama = [
    {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"},
    {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"},
]
flask = [
    {file = "Flask-2.0.2-py3-none-any.whl", hash = "sha256:cb90f62f1d8e4dc4621f52106613488b5ba826b2e1e10a33eac92f723093ab6a"},
    {file = "Flask-2.0.2.tar.gz", hash = "sha256:7b2fb8e934ddd50731893bdcdb00fc8c0315916f9fcd50d22c7cc1a95ab634e2"},
]
flask-admin = [
    {file = "Flask-Admin-1.5.8.tar.gz", hash = "sha256:eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74"},
]
itsdangerous = [
    {file = "itsdangerous-2.0.1-py3-none-any.whl", hash = "sha256:5174094b9637652bdb841a3029700391451bd092ba3db90600dea710ba28e97c"},
    {file = "itsdangerous-2.0.1.tar.gz", hash = "sha256:9e724d68fc22902a1435351f84c3fb8623f303fffcc566a4cb952df8c572cff0"},
]
jinja2 = [
    {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"},
    {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"},
]
markupsafe = [
    {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"},
    {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"},
    {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"},
    {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"},
    {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"},
    {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"},
    {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"},
]
werkzeug = [
    {file = "Werkzeug-2.0.2-py3-none-any.whl", hash = "sha256:63d3dc1cf60e7b7e35e97fa9861f7397283b75d765afcaefd993d6046899de8f"},
    {file = "Werkzeug-2.0.2.tar.gz", hash = "sha256:aa2bb6fc8dee8d6c504c0ac1e7f5f7dc5810a9903e793b6f715a9f015bdadb9a"},
]
wtforms = [
    {file = "WTForms-3.0.0-py3-none-any.whl", hash = "sha256:232dbb0094847dca2f45c72136b5ca1d5dca2a3e24ccd2229823b8b74b3c6698"},
    {file = "WTForms-3.0.0.tar.gz", hash = "sha256:4abfbaa1d529a1d0ac927d44af8dbb9833afd910e56448a103f1893b0b176886"},
]

temp solution for project who need this is to install the package through pip, but it have to be done on after every `poetry install`

this issue previously have other blocking issue #4701 (comment)
e:
similar issue:

@rachmadaniHaryono rachmadaniHaryono added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Nov 28, 2021
@finswimmer
Copy link
Member

Hey @rachmadaniHaryono,

unfortunately I'm not able to reproduce your issue. Can you please clear poetry's cache by poetry cache clear --all pypi and try again?

fin swimmer

@rachmadaniHaryono
Copy link
Author

still the same result

> poetry cache clear --all pypi
Delete 965 entries? (yes/no) [no] yes
> poetry add flask-admin -vvv
Using virtualenv: /home/r3r/.cache/pypoetry/virtualenvs/temp--3d1chu2-py3.9
PyPI: 37 packages found for flask-admin *
Using version ^1.5.8 for Flask-Admin

Updating dependencies
Resolving dependencies...
   1: fact: temp is 0.1.0
   1: derived: temp
   1: fact: temp depends on Flask-Admin (^1.5.8)
   1: selecting temp (0.1.0)
   1: derived: Flask-Admin (>=1.5.8,<2.0.0)
PyPI: 1 packages found for flask-admin >=1.5.8,<2.0.0
PyPI: Getting info for flask-admin (1.5.8) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading sdist: Flask-Admin-1.5.8.tar.gz
   1: fact: flask-admin (1.5.8) depends on Flask (>=0.7)
   1: fact: flask-admin (1.5.8) depends on wtforms (*)
   1: selecting flask-admin (1.5.8)
   1: derived: wtforms
   1: derived: Flask (>=0.7)
PyPI: Getting info for wtforms (3.0.0) from PyPI
   1: fact: wtforms (3.0.0) depends on MarkupSafe (*)
   1: selecting wtforms (3.0.0)
   1: derived: MarkupSafe
PyPI: Getting info for flask (2.0.2) from PyPI
   1: fact: flask (2.0.2) depends on Werkzeug (>=2.0)
   1: fact: flask (2.0.2) depends on Jinja2 (>=3.0)
   1: fact: flask (2.0.2) depends on itsdangerous (>=2.0)
   1: fact: flask (2.0.2) depends on click (>=7.1.2)
   1: selecting flask (2.0.2)
   1: derived: click (>=7.1.2)
   1: derived: itsdangerous (>=2.0)
   1: derived: Jinja2 (>=3.0)
   1: derived: Werkzeug (>=2.0)
PyPI: Getting info for markupsafe (2.0.1) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading sdist: MarkupSafe-2.0.1.tar.gz
   1: selecting markupsafe (2.0.1)
PyPI: Getting info for click (8.0.3) from PyPI
   1: fact: click (8.0.3) depends on colorama (*)
   1: selecting click (8.0.3)
   1: derived: colorama
PyPI: Getting info for itsdangerous (2.0.1) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: itsdangerous-2.0.1-py3-none-any.whl
   1: selecting itsdangerous (2.0.1)
PyPI: Getting info for jinja2 (3.0.3) from PyPI
   1: fact: jinja2 (3.0.3) depends on MarkupSafe (>=2.0)
   1: selecting jinja2 (3.0.3)
PyPI: Getting info for werkzeug (2.0.2) from PyPI
   1: selecting werkzeug (2.0.2)
PyPI: Getting info for colorama (0.4.4) from PyPI
PyPI: No dependencies found, downloading archives
PyPI: Downloading wheel: colorama-0.4.4-py2.py3-none-any.whl
   1: selecting colorama (0.4.4)
   1: Version solving took 75.361 seconds.
   1: Tried 1 solutions.

Finding the necessary packages for the current system

Package operations: 1 install, 0 updates, 0 removals, 8 skipped

  • Removing colorama (0.4.4): Pending...
  • Removing colorama (0.4.4): Skipped for the following reason: Not currently installed
  • Installing markupsafe (2.0.1): Pending...
  • Installing markupsafe (2.0.1): Skipped for the following reason: Already installed
  • Installing click (8.0.3): Pending...
  • Installing click (8.0.3): Skipped for the following reason: Already installed
  • Installing itsdangerous (2.0.1): Pending...
  • Installing itsdangerous (2.0.1): Skipped for the following reason: Already installed
  • Installing jinja2 (3.0.3): Pending...
  • Installing jinja2 (3.0.3): Skipped for the following reason: Already installed
  • Installing werkzeug (2.0.2): Pending...
  • Installing werkzeug (2.0.2): Skipped for the following reason: Already installed
  • Installing flask (2.0.2): Pending...
  • Installing flask (2.0.2): Skipped for the following reason: Already installed
  • Installing wtforms (3.0.0): Pending...
  • Installing wtforms (3.0.0): Skipped for the following reason: Already installed
  • Installing flask-admin (1.5.8): Pending...
  • Installing flask-admin (1.5.8): Failed

  RuntimeError

  Invalid hashes (sha256:e7e11ee8bf67ad176dd1224c137e860f5d387357d7331fc650f0a9eef03cdc83) for flask-admin (1.5.8) using archive Flask-Admin-1.5.8.tar.gz. Expected one of sha256:eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74.

  at ~/.poetry/lib/poetry/installation/executor.py:627 in _download_link
      623│                     )
      624│                 )
      625│
      626│             if archive_hashes.isdisjoint(hashes):
    → 627│                 raise RuntimeError(
      628│                     "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
      629│                         ", ".join(sorted(archive_hashes)),
      630│                         package,
      631│                         archive_path.name,


Failed to add packages, reverting the pyproject.toml file to its original content.

@wizard-28
Copy link

Same Invalid hashes issue when installing virtualenv(20.10.0) as a dependency for pre_commit(2.15.0)

@rachmadaniHaryono
Copy link
Author

rachmadaniHaryono commented Nov 28, 2021

should the title be changed, because it is happen not only on flask-admin ?

invalid hashes error despite correct hash?

@finswimmer
Copy link
Member

How did you install poetry?

@wizard-28
Copy link

How did you install poetry?

curl -sSL https://install.python-poetry.org | python3 -

@finswimmer
Copy link
Member

Hm, really strange. I still cannot reproduce it. Neither on ArchLinux nor in a fresh Ubuntu 21.10 docker container. :(

@rachmadaniHaryono
Copy link
Author

rachmadaniHaryono commented Nov 28, 2021

if you install from pip, which hash do you get? wizard and i got different result from poetry

e: or i assume you get what poetry expected

flask-admin
e7e11ee8bf67ad176dd1224c137e860f5d387357d7331fc650f0a9eef03cdc83

virtualenv
0cca5a293e64da7d0ec61cacc17df87e41a16d330f7d4fb5082c4850d5bc68f5

@finswimmer
Copy link
Member

pip downloads Flask-Admin-1.5.8.tar.gz. If i run sha256sum Flask-Admin-1.5.8.tar.gz on it I get: eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74 and that's the same as in poetry.lock:

$ grep Flask-Admin-1.5.8.tar.gz poetry.lock 
    {file = "Flask-Admin-1.5.8.tar.gz", hash = "sha256:eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74"},

@wizard-28
Copy link

I reinstalled Poetry today, and the virtualenv installation worked? @rachmadaniHaryono try reinstalling Poetry.

@finswimmer
Copy link
Member

Make also sure, that you really have only on installation of poetry. As you can install by get-poetry.py, install-poetry.py, and pip(x) it's quite easy to have multiple installation without notifying it ;)

@rachmadaniHaryono
Copy link
Author

rachmadaniHaryono commented Nov 29, 2021

uninstalling

> poetry --version
Poetry version 1.1.12
> which poetry
/home/r3r/.poetry/bin/poetry
> curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --uninstall
# We are sorry to see you go!

This will uninstall Poetry.

It will remove the `poetry` command from Poetry's bin directory, located at:

$HOME/.poetry/bin

This will also remove Poetry from your system's PATH.
> poetry --version
poetry: command not found
> which poetry
poetry not found

installing

> curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
Retrieving Poetry metadata

This installer is deprecated. Poetry versions installed using this script will not be able to use 'self update' command to upgrade to 1.2.0a1 or later.
# 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/.poetry/bin

This path will then be added to your `PATH` environment variable by
modifying the profile files located at:

$HOME/.profile
$HOME/.zshrc
$HOME/.bash_profile

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

Installing version: 1.1.12
  - Downloading poetry-1.1.12-linux.tar.gz (66.70MB)

Poetry (1.1.12) is installed now. Great!

To get started you need Poetry's bin directory ($HOME/.poetry/bin) in your `PATH`
environment variable. Next time you log in this will be done
automatically.

To configure your current shell run `source $HOME/.poetry/env`

> poetry --version
Poetry version 1.1.12
> which poetry
/home/r3r/.poetry/bin/poetry

installing flask-admin

> poetry add flask-admin
Using version ^1.5.8 for Flask-Admin

Updating dependencies
Resolving dependencies... (0.2s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing flask-admin (1.5.8): Failed

  RuntimeError

  Invalid hashes (sha256:e7e11ee8bf67ad176dd1224c137e860f5d387357d7331fc650f0a9eef03cdc83) for flask-admin (1.5.8) using archive Flask-Admin-1.5.8.tar.gz. Expected one of sha256:eb06a1f31b98881dee53a55c64faebd1990d6aac38826364b280df0b2679ff74.

  at ~/.poetry/lib/poetry/installation/executor.py:627 in _download_link
      623│                     )
      624│                 )
      625│
      626│             if archive_hashes.isdisjoint(hashes):
    → 627│                 raise RuntimeError(
      628│                     "Invalid hashes ({}) for {} using archive {}. Expected one of {}.".format(
      629│                         ", ".join(sorted(archive_hashes)),
      630│                         package,
      631│                         archive_path.name,


Failed to add packages, reverting the pyproject.toml file to its original content.

still the same result
another thing i can try is to use pipx, and i will post the result later

@rachmadaniHaryono
Copy link
Author

installing poetry with pipx

> curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - --uninstall
# We are sorry to see you go!

This will uninstall Poetry.

It will remove the `poetry` command from Poetry's bin directory, located at:

$HOME/.poetry/bin

This will also remove Poetry from your system's PATH.

> pipx install poetry
  installed package poetry 1.1.12, Python 3.10.0
  These apps are now globally available
    - poetry
done! ✨ 🌟 ✨
> poetry --version
Poetry version 1.1.12
> poetry add flask-admin
Creating virtualenv temp--3d1chu2-py3.10 in /home/r3r/.cache/pypoetry/virtualenvs
Using version ^1.5.8 for Flask-Admin

Updating dependencies
Resolving dependencies... (0.3s)

Package operations: 8 installs, 0 updates, 0 removals

  • Installing markupsafe (2.0.1)
  • Installing click (8.0.3)
  • Installing itsdangerous (2.0.1)
  • Installing jinja2 (3.0.3)
  • Installing werkzeug (2.0.2)
  • Installing flask (2.0.2)
  • Installing wtforms (3.0.0)
  • Installing flask-admin (1.5.8)

other info

> python --version
Python 3.9.7
> pipx --version
0.16.4
> which python
/home/r3r/.pyenv/shims/python
> which pipx
/home/r3r/.local/bin/pipx

i notice pipx install different python in comparison to my default python installed package poetry 1.1.12, Python 3.10.0
should i close the issue with this?

@rachmadaniHaryono
Copy link
Author

this issue is fixed with poetry 1.1.13

@abn abn removed the status/triage This issue needs to be triaged label Mar 3, 2022
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

4 participants