https://pantsbuild.org/ logo
#general
Title
# general
q

quaint-forest-8735

07/15/2022, 3:47 PM
Hey folks, we're encountering this failure when generating a pex lockfile with our current requirements (this is on pants 2.12.0) -- interestingly enough, we're successfully able to generate a poetry lockfile with the same
requirements.txt
. Any thoughts as to what might be causing this?
Copy code
File "/Users/rahulm/.cache/pants/named_caches/pex_root/installed_wheels/6242b902db69f59e1092b406655c0fb1634486c47ce563f5fd27277cf4561822/pex-2.1.90-py2.py3-none-any.whl/pex/dist_metadata.py", line 294, in from_filename
    project_name, version = fname.rsplit("-", 1)
ValueError: not enough values to unpack (expected 2, got 1)
This might also be related, but many transitive deps in our poetry lockfiles are actually missing hashes, which cause
./pants export ::
to fail For ex:
Copy code
ProcessExecutionFailure: Process 'Installing 3rdparty/python/default.lock for the resolve `python-default`' failed with exit code 1.
stdout:

stderr:
ERROR: Hashes are required in --require-hashes mode, but they are missing from some requirements. Here is a list of those requirements along with the hashes their downloaded archives actually had. Add lines like these to your requirements files to prevent tampering. (If you did not enable --require-hashes manually, note that it turns on automatically when any package has a hash.)
h

hundreds-father-404

07/15/2022, 6:57 PM
Hi! Re Poetry hashes not working, check out https://github.com/pantsbuild/pants/pull/16112. We cherry-picked it to 2.11. You can also manually fix by setting
[poetry].version == "poetry==1.1.14"
in pants.toml
q

quaint-forest-8735

07/15/2022, 6:58 PM
Cool, thanks very much @hundreds-father-404. I’ll give that a try
🤞 1
❤️ 1
3 Views