silly-diamond-59365
02/10/2022, 10:09 PMProcessExecutionFailure: Process 'Resolving constraints.txt' failed with exit code 1.
...
KeyError: "There is no item named 'Hypercorn-0.13.2.dist-info/METADATA' in the archive"
In that example, I went from hypercorn
0.11.2 to 0.13.2. At first I was thinking this is just related to that particular library, but I've seen that issue happen with another: stream-chat
. Other requirements seem to be updating fine and updating that package with pip directly seems to work.
Has anyone else experienced this kind of issue and/or can point me in the right direction? Any help would be more appreciated! Thanks!happy-kitchen-89482
02/10/2022, 11:52 PM-ldebug
? You can also DM me if there is anything sensitive in there, or redactsilly-diamond-59365
02/11/2022, 7:33 PMwhl
from pypi, the directory name it had was hypercorn-0.13.2.dist-info
but the file that's been looked for (and throwing the error on) is Hypercorn-0.13.2.dist-info/METADATA
(with the capital H
in the name). This might be a red herring, but case mismatches seem to be a regular pest in my life 😄enough-analyst-54434
02/11/2022, 11:23 PM$ pex --python python3.7 pex==2.1.42 -cpex -- Hypercorn==0.13.2 --disable-cache -- -c "import hypercorn; print(hypercorn.__file__)"
...
File "/home/jsirois/.pex/installed_wheels/65c5c41e7bd725c6e82b3cd1a3d829ce48781cab/pex-2.1.42-py2.py3-none-any.whl/pex/dist_metadata.py", line 107, in _parse_wheel_package_info
with whl.open(os.path.join(dist_info_dir, DistInfoDistribution.PKG_INFO)) as fp:
File "/usr/lib/python3.7/zipfile.py", line 1503, in open
zinfo = self.getinfo(name)
File "/usr/lib/python3.7/zipfile.py", line 1431, in getinfo
'There is no item named %r in the archive' % name)
KeyError: "There is no item named 'Hypercorn-0.13.2.dist-info/METADATA' in the archive"
Fixed at 2.1.43:
$ pex --python python3.7 pex==2.1.43 -cpex -- Hypercorn==0.13.2 --disable-cache -- -c "import hypercorn; print(hypercorn.__file__)"
/tmp/tmpbsluw3ez/installed_wheels/054e74981a503fc0407a4d54dbe8a2e3722bae74/Hypercorn-0.13.2-py3-none-any.whl/hypercorn/__init__.py
That changelog is here: https://github.com/pantsbuild/pex/releases/tag/v2.1.43
And the fix was here: https://github.com/pantsbuild/pex/pull/1376
I'll drum up the magic to change the Pex version you're using here in a bit assuming you can't easily just upgrade Pants to 2.7x or newer.pants.toml
should do it:
[download-pex-bin]
version = "v2.1.45"
known_versions.add = [
"v2.1.45|darwin|8d7a267a9df7f9f81721b0100b8fe47bcd5821076981bebee207507a01bed9ae|3622149",
"v2.1.45|linux|8d7a267a9df7f9f81721b0100b8fe47bcd5821076981bebee207507a01bed9ae|3622149"
]
Hypercorn==0.13.2
to Pants' 3rdparty/python/requirements.txt
and then ./pants repl 3rdparty/python:Hypercorn
.