freezing-photographer-8855302/14/2022, 2:43 PM
The pytest_lockfile.txt is missing and prevents pants from running tests. Any idea of how to resolve this issue ?
>> ./pants tests target
[ERROR] 1 Exception encountered:
FileNotFoundError: [Errno 2] No such file or directory: '.cache/pants/setup/bootstrap-Darwin-x86_64/pants.0fpKJL/install/lib/python3.9/site-packages/pants/backend/python/subsystems/pytest_lockfile.txt'
refined-addition-5364402/14/2022, 2:45 PM
Which i suppose you already did
freezing-photographer-8855302/14/2022, 2:51 PM
directory, I also have to delete the pants related directories in my local repo (
enough-analyst-5443402/14/2022, 2:57 PM
worked, that was just a secondary effect. What really happened here was that the
daemon was still running when you deleted
and that long running daemon needs the Python venv you deleted (it runs from there). When you delete
that's a round-about way to force
to restart. You could have also done
or any number of other things to force the
daemon process to stop.
freezing-photographer-8855302/14/2022, 3:00 PM
enough-analyst-5443402/14/2022, 3:07 PM
script though. It should probably specify
when creating the pants venv. Since it doesn't currently, if the venv was built using a system Python that is layer upgraded, the venv is corrupted. This is a known issue with all venvs not created with
. I'll mint an issue / fix against the pantsbuild/setup repo this morning: https://github.com/pantsbuild/setup/blob/98e8f51f6094c30941f56d9ebdc49a9af6f82085/pants#L359
doesn't work. I was naive. I think we have no obvious way of fixing the current Pants venv scheme to be robust to this. It would effectively require yet another script to run that would repair the 1st.