question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Limit traceback to one entry by default

See original GitHub issue

What’s the problem this feature will solve?

Large and unnecessary tracebacks in user bug-reports

Describe the solution you’d like

Set the trace-back limit sys.tracebacklimit to 1 by default. Don’t set when verbose-logging (ie -vv passed at command-line). This includes build-backend subprocesses (in the vendored pep517 subprocess), but not when using an in-tree build-backend.

Alternative Solutions

None

Additional context

None

Code of Conduct

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pradyunsgcommented, Jul 27, 2022

I don’t think they are unnecessary by any means. And, making the build-backend process fail gracefully is the responsibility of the build backend – pip shouldn’t be trying to cooerce their output to be shorter and potentially make it more difficult for the authors to diagnose issues.

0reactions
pradyunsgcommented, Jul 27, 2022

FWIW, I do agree that we should be presenting our internal errors differently though. Something like rich’s tracebacks could make sense for that. I have a draft patch somewhere, adding rich tracebacks and a PIP_RICH_TRACEBACKS=0, pip --no-rich-tracebacks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to limit python traceback to specific files - Stack Overflow
It will SHOW traceback entries for files from these directories. ''' show = tuple(join(abspath(p), '') for p in show) def _check_file(name): return name...
Read more >
traceback — Print or retrieve a stack traceback — Python 3.11 ...
Print up to limit stack trace entries from traceback object tb (starting from the caller's frame) if limit is positive. Otherwise, print the...
Read more >
Understanding the Python Traceback
Python prints a traceback when an exception is raised in your code. The traceback output ... These calls are represented by two-line entries...
Read more >
traceback – Extract, format, and print exceptions and stack ...
A traceback is a stack trace from the point of an exception handler down the ... in traceback mimic the behavior of the...
Read more >
Traceback in Python - GeeksforGeeks
traceback.print_tb(tb, limit = None, file = None) : If limit is positive it prints upto limit stack trace entries from traceback object tb....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found