freezing-photographer-88553
02/14/2022, 2:43 PM>> ./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'
The pytest_lockfile.txt is missing and prevents pants from running tests. Any idea of how to resolve this issue ?refined-addition-53644
02/14/2022, 2:45 PM./pants version
Which i suppose you already didfreezing-photographer-88553
02/14/2022, 2:51 PM~/.cache/pants directory, I also have to delete the pants related directories in my local repo (.pants.d and pids).enough-analyst-54434
02/14/2022, 2:57 PM.pants.d and .pids worked, that was just a secondary effect. What really happened here was that the pantsd daemon was still running when you deleted ~/.cache/pants and that long running daemon needs the Python venv you deleted (it runs from there). When you delete .pants.d and .pids that's a round-about way to force pantsd to restart. You could have also done pkill pantsd or any number of other things to force the pantsd daemon process to stop.freezing-photographer-88553
02/14/2022, 3:00 PMenough-analyst-54434
02/14/2022, 3:07 PMpants script though. It should probably specify --copies 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 --copies. I'll mint an issue / fix against the pantsbuild/setup repo this morning: https://github.com/pantsbuild/setup/blob/98e8f51f6094c30941f56d9ebdc49a9af6f82085/pants#L359enough-analyst-54434
02/14/2022, 6:03 PM--copies 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.