Hello, one of our engineers is hitting a strange e...
# general
Hello, one of our engineers is hitting a strange error when running pants commands, and I haven’t had any luck with debugging. Could anyone by chance point out where I should be looking? (full error in 🧵 )
After running `rm -rf ~/.cache/pants`:
Copy code
% ./pants run redacted_internal_command.py
Bootstrapping Pants using /Users/kevin/Library/Caches/pypoetry/virtualenvs/allpdl-requirements-vm1Mpqc2-py3.9/bin/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 3529k  100 3529k    0     0  11.5M      0 --:--:-- --:--:-- --:--:-- 28.0M
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.42/pex> verified.
Installing pantsbuild.pants==2.12.0 into a virtual environment at /Users/kevin/.cache/pants/setup/bootstrap-Darwin-arm64/2.12.0_py39
created virtual environment CPython3.9.13.final.0-64 in 122ms
  creator CPython3Posix(dest=/Users/kevin/.cache/pants/setup/bootstrap-Darwin-arm64/pants.u9gdXl/install, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/Users/kevin/Library/Application Support/virtualenv)
    added seed packages: pip==21.1.2, setuptools==57.0.0, wheel==0.36.2
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
Requirement already satisfied: pip in /Users/kevin/.cache/pants/setup/bootstrap-Darwin-arm64/pants.u9gdXl/install/lib/python3.9/site-packages (21.1.2)
Collecting pip
  Using cached pip-22.2.2-py3-none-any.whl (2.0 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.1.2
    Uninstalling pip-21.1.2:
      Successfully uninstalled pip-21.1.2
Successfully installed pip-22.2.2
Collecting pantsbuild.pants==2.12.0
  Using cached pantsbuild.pants-2.12.0-cp39-cp39-macosx_11_0_arm64.whl (7.9 MB)
Collecting pex==2.1.90
  Using cached pex-2.1.90-py2.py3-none-any.whl (2.7 MB)
Requirement already satisfied: setuptools<58.0,>=56.0.0 in /Users/kevin/.cache/pants/setup/bootstrap-Darwin-arm64/pants.u9gdXl/install/lib/python3.9/site-packages (from pantsbuild.pants==2.12.0) (57.0.0)
Collecting toml==0.10.2
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting types-toml==0.10.3
  Using cached types_toml-0.10.3-py3-none-any.whl (2.1 kB)
Collecting typing-extensions==4.0.1
  Using cached typing_extensions-4.0.1-py3-none-any.whl (22 kB)
Collecting python-lsp-jsonrpc==1.0.0
  Using cached python_lsp_jsonrpc-1.0.0-py3-none-any.whl (8.5 kB)
Collecting PyYAML<7.0,>=6.0
  Using cached PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl (173 kB)
Collecting fasteners==0.16.3
  Using cached fasteners-0.16.3-py2.py3-none-any.whl (28 kB)
Collecting packaging==21.3
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting psutil==5.9.0
  Using cached psutil-5.9.0-cp39-cp39-macosx_12_0_arm64.whl
Collecting setproctitle==1.2.2
  Using cached setproctitle-1.2.2-cp39-cp39-macosx_12_0_arm64.whl
Collecting ansicolors==1.1.8
  Using cached ansicolors-1.1.8-py2.py3-none-any.whl (13 kB)
Collecting ijson==3.1.4
  Using cached ijson-3.1.4-py3-none-any.whl
Collecting types-setuptools==57.4.7
  Using cached types_setuptools-57.4.7-py3-none-any.whl (27 kB)
Collecting humbug==0.2.7
  Using cached humbug-0.2.7-py3-none-any.whl (11 kB)
Collecting types-PyYAML==6.0.3
  Using cached types_PyYAML-6.0.3-py3-none-any.whl (13 kB)
Collecting six
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting requests
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting ujson>=3.0.0
  Using cached ujson-5.4.0-cp39-cp39-macosx_11_0_arm64.whl (44 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.3-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.6.15.2-py3-none-any.whl (160 kB)
Installing collected packages: types-toml, types-setuptools, types-PyYAML, ijson, ansicolors, urllib3, ujson, typing-extensions, toml, six, setproctitle, PyYAML, pyparsing, psutil, pex, idna, charset-normalizer, certifi, requests, python-lsp-jsonrpc, packaging, fasteners, humbug, pantsbuild.pants
Successfully installed PyYAML-6.0 ansicolors-1.1.8 certifi-2022.6.15.2 charset-normalizer-2.1.1 fasteners-0.16.3 humbug-0.2.7 idna-3.3 ijson-3.1.4 packaging-21.3 pantsbuild.pants-2.12.0 pex-2.1.90 psutil-5.9.0 pyparsing-3.0.9 python-lsp-jsonrpc-1.0.0 requests-2.28.1 setproctitle-1.2.2 six-1.16.0 toml-0.10.2 types-PyYAML-6.0.3 types-setuptools-57.4.7 types-toml-0.10.3 typing-extensions-4.0.1 ujson-5.4.0 urllib3-1.26.12
New virtual environment successfully created at /Users/kevin/.cache/pants/setup/bootstrap-Darwin-arm64/2.12.0_py39.
16:10:01.25 [ERROR] 1 Exception encountered:

  FileNotFoundError: [Errno 2] No such file or directory: '/Users/kevin/.cache/pants/setup/bootstrap-Darwin-arm64/pants.WZlCsa/install/lib/python3.9/site-packages/pants/backend/python/dependency_inference/scripts/dependency_parser.py'
Posted this a minute too soon, running the same command with
pantsd seemed to do the trick
Which version of Pants is this?
Turning off pantsd is hardly a satisfactory solution, so I wouldn’t expect you to be content with that
That is an odd error
indeed not present?
After killing the pantsd process subsequent runs with pantsd on seemed to work
If it helps we’ve seen this issue being reported from searching our slack two times before, with the earliest instance being July 3
I unfortunately did not check
Ah, OK
So that is still annoying, but slightly less so
since there is a workaround
Yeah, it’s another item in our playbook of things to do if a strange error is encountered 🙂
And this is on an M1 it looks like?
It has also been observed on an intel mac as well
ah, good to know
Could you file an issue?
And if you see the problem again it would be good to note the pants version, the file that was missing, and whether it was actually missing on the system when you subsequently checked for it
👍 1