Hello, I’m trying to run pants helloworld example...
# general
c
Hello, I’m trying to run pants helloworld example from https://github.com/pantsbuild/example-python. $ ./pants test helloworld/util/lang_test.py --print-stacktrace Getting: ProcessExecutionFailure: Process ‘Building pytest.pex with 2 requirements: pytest-cov>=2.10.1,<2.12, pytest>=6.0.1,<6.3’ failed with exit code 1
Full log: 180745.18 [INFO] Completed: Building pytest.pex with 2 requirements: pytest-cov>=2.10.1,<2.12, pytest>=6.0.1,<6.3 180745.19 [ERROR] Exception caught: (pants.engine.internals.scheduler.ExecutionError) File “/Users/337782676/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.0_py37/lib/python3.7/site-packages/pants/bin/local_pants_runner.py”, line 234, in _run_inner return self._perform_run(goals) File “/Users/337782676/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.0_py37/lib/python3.7/site-packages/pants/bin/local_pants_runner.py”, line 173, in _perform_run return self._perform_run_body(goals, poll=False) File “/Users/337782676/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.0_py37/lib/python3.7/site-packages/pants/bin/local_pants_runner.py”, line 195, in _perform_run_body poll_delay=(0.1 if poll else None), File “/Users/337782676/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.0_py37/lib/python3.7/site-packages/pants/init/engine_initializer.py”, line 136, in run_goal_rules goal_product, params, poll=poll, poll_delay=poll_delay File “/Users/337782676/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.0_py37/lib/python3.7/site-packages/pants/engine/internals/scheduler.py”, line 530, in run_goal_rule self._raise_on_error([t for _, t in throws]) File “/Users/337782676/.cache/pants/setup/bootstrap-Darwin-x86_64/2.5.0_py37/lib/python3.7/site-packages/pants/engine/internals/scheduler.py”, line 500, in _raise_on_error wrapped_exceptions=tuple(t.exc for t in throws), Exception message: 1 Exception encountered: ProcessExecutionFailure: Process ‘Building pytest.pex with 2 requirements: pytest-cov>=2.10.1,<2.12, pytest>=6.0.1,<6.3’ failed with exit code 1. stdout: stderr: WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ’ProtocolError(‘Connection aborted.’, ConnectionResetError(54, ‘Connection reset by peer’))’: /simple/pytest-cov/ ERROR: Could not find a version that satisfies the requirement pytest-cov<2.12,>=2.10.1 ERROR: No matching distribution found for pytest-cov<2.12,>=2.10.1 pid 71908 -> /Users/337782676/.cache/pants/named_caches/pex_root/venvs/cb73f8049e994ef94c87e8025110acac81d360ef/caa44f9cc54fd93d5e3e7d8a5d1dc00abb997a70/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/337782676/.cache/pants/named_caches/pex_root --log /private/var/folders/35/0694cnm970qfhkpw87g3xwdw0000gp/T/process-executionPRj79m/.tmp/tmpu84jcmop/pip.log download --dest /private/var/folders/35/0694cnm970qfhkpw87g3xwdw0000gp/T/process-executionPRj79m/.tmp/tmpe1rat5lt/Users.337782676.opt.miniconda3.bin.python3.7 --constraint constraints.txt pytest-cov>=2.10.1,<2.12 pytest>=6.0.1,<6.3 --index-url https://pypi.org/simple/ --retries 5 --timeout 15 exited with 1 and STDERR: None (Use --print-stacktrace to see more error details.) 180745.19 [INFO] Canceled: Resolving constraints.txt
h
👀
All this "Connection aborted" stuff looks like a network or PyPI issue. Does this persist if you try again after a few minutes?
c
Yes, I’ve tried several times. Few times it gave me different error: ERROR: Could not find a version that satisfies the requirement PyYAML==5.4.1 ERROR: No matching distribution found for PyYAML==5.4.1
Running within corporate environment behind proxy. Another issue I had was “invalid certificate: UnknownIssuer” which I fixed by setting ca_certs_path
I could also see that other pip dependencies were resolved as usual
e
@curved-electrician-64177 this output:
Copy code
pid 71908 -> /Users/337782676/.cache/pants/named_caches/pex_root/venvs/cb73f8049e994ef94c87e8025110acac81d360ef/caa44f9cc54fd93d5e3e7d8a5d1dc00abb997a70/pex --disable-pip-version-check --no-python-version-warning --exists-action a --isolated -q --cache-dir /Users/337782676/.cache/pants/named_caches/pex_root --log /private/var/folders/35/0694cnm970qfhkpw87g3xwdw0000gp/T/process-executionPRj79m/.tmp/tmpu84jcmop/pip.log download --dest /private/var/folders/35/0694cnm970qfhkpw87g3xwdw0000gp/T/process-executionPRj79m/.tmp/tmpe1rat5lt/Users.337782676.opt.miniconda3.bin.python3.7 --constraint constraints.txt pytest-cov>=2.10.1,<2.12 pytest>=6.0.1,<6.3 --index-url <https://pypi.org/simple/> --retries 5 --timeout 15
Indicates you have not configured a proxy. That's Pex using Pip to hit pypi directly. How are you attempting to configure the proxy?
If via environment variable, you'll need to configure:
Copy code
[subprocess-environment]
env_vars.add = [ "HTTP_PROXY", ... ]
Or whatever env vars you're trying to set it up with.
If that's not it, please give more details.
c
Proxy was configured via env vars. So adding the configuration below helped to solve the issue:
Copy code
[subprocess-environment]
env_vars.add = ["http_proxy", "https_proxy"]
At the same time, in other corporate environments access to github and use of proxy are not allowed. I can see that the page you mentioned has information how to configure custom binary sources. Appreciate the help @enough-analyst-54434!