Skip to content

[FR] Give user-friendly error messages when things go wrong rather than a stack trace #5073

@cdfarrow

Description

@cdfarrow

What's the problem this feature will solve?

I appreciate that error messages from setuptools have improved a lot over the last few years, however stack traces still seem to be a regular experience. The standard Python error trace is just ugly and makes it difficult to quickly see what the problem is, and is not user-friendly.
My common scenario is that I open up the .whl file in a zip viewer to verify/review the contents and often forget to close it. When I run build again, I get the error "PermissionError: [WinError 32] The process cannot access the file because it is being used by another process". This is very unfriendly and yet is a simple scenario to trap and give a friendly one-line message instead of a screenful of stack trace.
[Windows 11; setuptools 80.9.0]

Describe the solution you'd like

Display a friendly message such as, " is being used by another program. Please close it and try again."

Alternative Solutions

No response

Additional context

See also this issue in the build repo.

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageIssues that need to be evaluated for severity and status.enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions