Skip to content

Comments

report more details on build backend exception#8464

Merged
radoering merged 2 commits intopython-poetry:masterfrom
dimbleby:build-backend-error-message
Sep 24, 2023
Merged

report more details on build backend exception#8464
radoering merged 2 commits intopython-poetry:masterfrom
dimbleby:build-backend-error-message

Conversation

@dimbleby
Copy link
Contributor

@dimbleby dimbleby commented Sep 23, 2023

show the inner error associated with a BuildBackendException

eg for #8137 (comment) this gives the extra output:

  Traceback (most recent call last):
    File "/home/dch/.virtualenvs/poetry/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
      obj = import_module(mod_path)
            ^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib/python3.12/importlib/__init__.py", line 90, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1304, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
    File "<frozen importlib._bootstrap>", line 1381, in _gcd_import
    File "<frozen importlib._bootstrap>", line 1354, in _find_and_load
    File "<frozen importlib._bootstrap>", line 1325, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 929, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 994, in exec_module
    File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
    File "/tmp/tmp6wqbgy0u/.venv/lib/python3.12/site-packages/setuptools/__init__.py", line 10, in <module>
      import distutils.core
  ModuleNotFoundError: No module named 'distutils'

which makes it considerably more obvious what the problem is (distutils doesn't exist in python 3.12).

Maybe it'll show something helpful in #7611 too.

@radoering radoering merged commit b6ebabf into python-poetry:master Sep 24, 2023
@dimbleby dimbleby deleted the build-backend-error-message branch September 24, 2023 10:28
@github-actions
Copy link

github-actions bot commented Mar 3, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants