Skip to content

Python tests failing to build: AssertionError: /usr/local/lib/python3.8/distutils/core.py #28391

@apolcyn

Description

@apolcyn
Successfully installed virtualenv-16.7.9
WARNING: You are using pip version 19.2.3, however version 21.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
+ python3.8 -m virtualenv py38_asyncio
Using base prefix '/usr/local'
New python executable in /var/local/git/grpc/py38_asyncio/bin/python3.8
Also creating executable in /var/local/git/grpc/py38_asyncio/bin/python
Installing setuptools, pip, wheel...
done.
++ script_realpath py38_asyncio/bin/python
+++ command -v realpath
++ '[' -x /usr/bin/realpath ']'
++ realpath py38_asyncio/bin/python
+ VENV_PYTHON=/var/local/git/grpc/py38_asyncio/bin/python3.8
+ curl https://bootstrap.pypa.io/pip/2.7/get-pip.py
+ /var/local/git/grpc/py38_asyncio/bin/python3.8
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1863k  100 1863k    0     0   9.8M      0 --:--:-- --:--:-- --:--:--  9.8M
/var/local/git/grpc/py38_asyncio/lib/python3.8/site-packages/_distutils_hack/__init__.py:23: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
  warnings.warn(
/var/local/git/grpc/py38_asyncio/lib/python3.8/site-packages/_distutils_hack/__init__.py:35: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
Traceback (most recent call last):
  File "<stdin>", line 23974, in <module>
  File "<stdin>", line 199, in main
  File "<stdin>", line 121, in bootstrap
  File "/var/local/git/grpc/py38_asyncio/lib/python3.8/site-packages/setuptools/__init__.py", line 8, in <module>
    import _distutils_hack.override  # noqa: F401
  File "/var/local/git/grpc/py38_asyncio/lib/python3.8/site-packages/_distutils_hack/override.py", line 1, in <module>
    __import__('_distutils_hack').do_override()
  File "/var/local/git/grpc/py38_asyncio/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 73, in do_override
    ensure_local_distutils()
  File "/var/local/git/grpc/py38_asyncio/lib/python3.8/site-packages/_distutils_hack/__init__.py", line 61, in ensure_local_distutils
    assert '_distutils' in core.__file__, core.__file__
AssertionError: /usr/local/lib/python3.8/distutils/core.py

2021-12-20 18:53:57,023 FAILED: /var/local/git/grpc/tools/run_tests/helper_scripts/build_python.sh [ret=1, pid=5322, time=8.0sec]
2021-12-20 18:53:57,023 FAILED: Some tests failed
  adding: reports/ (stored 0%)
+ DOCKER_EXIT_CODE=1
++ mktemp
+ TEMP_REPORTS_ZIP=/tmpfs/tmp/tmp.RQLKHYMvol
+ docker cp run_tests_1faca4a9-83c4-4862-889a-795a25c755f6:/var/local/git/grpc/reports.zip /tmpfs/tmp/tmp.RQLKHYMvol
+ '[' /tmpfs/src/github/grpc '!=' '' ']'
+ REPORTS_DEST_DIR=/tmpfs/src/github/grpc
+ unzip -o /tmpfs/tmp/tmp.RQLKHYMvol -d /tmpfs/src/github/grpc
Archive:  /tmpfs/tmp/tmp.RQLKHYMvol
+ rm -f /tmpfs/tmp/tmp.RQLKHYMvol
+ docker rm -f run_tests_1faca4a9-83c4-4862-889a-795a25c755f6
run_tests_1faca4a9-83c4-4862-889a-795a25c755f6
+ exit 1
Traceback (most recent call last):
  File "tools/run_tests/run_tests.py", line 1612, in <module>
    env=env)
  File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'tools/run_tests/dockerize/build_docker_and_run_tests.sh' returned non-zero exit status 1

https://source.cloud.google.com/results/invocations/0a04a4f3-939e-4240-9828-29e3348e1926/targets/github%2Fgrpc%2Ftoplevel_run_tests_invocations%2Frun_tests_python_linux_opt_asyncio/tests

seen in #27883

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions