You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[tests] When test_venv.test_with_pip() fails, a bug in error handling fails to display stderr #97764
ERROR: test_with_pip (test.test_venv.EnsurePipTest.test_with_pip)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py", line 660, in nicer_error
yield
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py", line 595, in do_test_with_pip
self.run_with_capture(venv.create, self.env_dir,
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py", line 87, in run_with_capture
func(*args, **kwargs)
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/venv/__init__.py", line 459, in create
builder.create(env_dir)
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/venv/__init__.py", line 76, in create
self._setup_pip(context)
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/venv/__init__.py", line 349, in _setup_pip
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/subprocess.py", line 465, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/subprocess.py", line 569, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/tmp/test_python_92rnuaxl/tmpkaiesc24/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py", line 672, in test_with_pip
self.do_test_with_pip(False)
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py", line 594, in do_test_with_pip
with self.nicer_error():
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/contextlib.py", line 155, in __exit__
self.gen.throw(value)
File "/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py", line 663, in nicer_error
err = exc.stderr.decode(errors="replace")
^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'decode'
Activity
dorosch commentedon Oct 21, 2022
Hello @vstinner
Looks like this has been fixed in #98263
vstinner commentedon Nov 3, 2022
Cool! I close my issue.