Title: [tests] When test_venv.test_with_pip() fails, a bug in error handling fails to display stderr · Issue #97764 · python/cpython · GitHub
Open Graph Title: [tests] When test_venv.test_with_pip() fails, a bug in error handling fails to display stderr · Issue #97764 · python/cpython
X Title: [tests] When test_venv.test_with_pip() fails, a bug in error handling fails to display stderr · Issue #97764 · python/cpython
Description: https://buildbot.python.org/all/#/builders/719/builds/1696 ERROR: test_with_pip (test.test_venv.EnsurePipTest.test_with_pip) ---------------------------------------------------------------------- Traceback (most recent call last): File "...
Open Graph Description: https://buildbot.python.org/all/#/builders/719/builds/1696 ERROR: test_with_pip (test.test_venv.EnsurePipTest.test_with_pip) ---------------------------------------------------------------------- T...
X Description: https://buildbot.python.org/all/#/builders/719/builds/1696 ERROR: test_with_pip (test.test_venv.EnsurePipTest.test_with_pip) ---------------------------------------------------------------------- T...
Opengraph URL: https://github.com/python/cpython/issues/97764
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[tests] When test_venv.test_with_pip() fails, a bug in error handling fails to display stderr","articleBody":"https://buildbot.python.org/all/#/builders/719/builds/1696\r\n\r\n```\r\nERROR: test_with_pip (test.test_venv.EnsurePipTest.test_with_pip)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py\", line 660, in nicer_error\r\n yield\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py\", line 595, in do_test_with_pip\r\n self.run_with_capture(venv.create, self.env_dir,\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py\", line 87, in run_with_capture\r\n func(*args, **kwargs)\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/venv/__init__.py\", line 459, in create\r\n builder.create(env_dir)\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/venv/__init__.py\", line 76, in create\r\n self._setup_pip(context)\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/venv/__init__.py\", line 349, in _setup_pip\r\n subprocess.check_output(cmd, stderr=subprocess.STDOUT)\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/subprocess.py\", line 465, in check_output\r\n return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,\r\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/subprocess.py\", line 569, in run\r\n raise CalledProcessError(retcode, process.args,\r\nsubprocess.CalledProcessError: Command '['/tmp/test_python_92rnuaxl/tmpkaiesc24/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py\", line 672, in test_with_pip\r\n self.do_test_with_pip(False)\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py\", line 594, in do_test_with_pip\r\n with self.nicer_error():\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/contextlib.py\", line 155, in __exit__\r\n self.gen.throw(value)\r\n File \"/buildbot/buildarea/3.x.pablogsal-arch-x86_64.clang-ubsan/build/Lib/test/test_venv.py\", line 663, in nicer_error\r\n err = exc.stderr.decode(errors=\"replace\")\r\n ^^^^^^^^^^^^^^^^^\r\nAttributeError: 'NoneType' object has no attribute 'decode'\r\n```","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2022-10-03T14:01:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/97764/cpython/issues/97764"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ba85ca9f-33e4-b9fd-fd45-f4d0ff31763a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CFB4:1219C5:1D3089B:28ED760:696A575E |
| html-safe-nonce | ec1fad4350cb43c25e4ce913d77f90404b15e58ebfbfd9a7282a689d960fe23b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRkI0OjEyMTlDNToxRDMwODlCOjI4RUQ3NjA6Njk2QTU3NUUiLCJ2aXNpdG9yX2lkIjoiMTQyMTgzNzI5MDA0Mjk3MTk5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b3df5b77a500e923653fdd23cf8713e8d7ea10c46cb41ef67d81d76a4bcbb9ab |
| hovercard-subject-tag | issue:1394793888 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/97764/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f6913da62720d2f988deaf0d696998fa458a8dc413e7d5ee9f8b094c7f486784/python/cpython/issues/97764 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f6913da62720d2f988deaf0d696998fa458a8dc413e7d5ee9f8b094c7f486784/python/cpython/issues/97764 |
| og:image:alt | https://buildbot.python.org/all/#/builders/719/builds/1696 ERROR: test_with_pip (test.test_venv.EnsurePipTest.test_with_pip) ---------------------------------------------------------------------- T... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vstinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3f871c8e07f0ae1886fa8dac284166d28b09ad5bada6476fc10b674e489788ef |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 63c426b30d262aba269ef14c40e3c817b384cd61 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width