Skip to content

Give user-friendly error messages when things go wrong rather than a stack trace #931

@cdfarrow

Description

@cdfarrow

Two scenarios hit me regularly, and the standard Python error trace is just ugly and makes it difficult to quickly see what the problem is:

  1. I often don't have internet turned on and get a whole barrage of fails "WARNING: Retrying... Failed to establish a new connection" finally finishing with a useless traceback. This is an easily anticipated scenario, which should be caught and the user informed nicely. [BTW, I just found out about the -n option and have started using that; I don't know why you'd want to download setuptools, etc. every time you run build.]
  2. I often open up the .whl file in a zip viewer to verify/review the contents. If I run build again without closing it, I get the traceback with "PermissionError: [WinError 32] The process cannot access the file because it is being used by another process". Again, this is very unfriendly and yet a simple scenario to trap and give a friendly one-line message instead of a screenful of stack trace.
    EDIT: I just realised that the second issue is with setuptools, not wheel (sorry), so I'll report this in that repo, too. Overall, though, stack dumps seem to be a regular part of using the Python build tools, and besides being difficult to interpret, I'd suggest that they give an unprofessional impression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions