Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: limit error traceback to one line for expected exceptions #10715

Open
jorisvandenbossche opened this issue Aug 1, 2015 · 3 comments
Open
Labels
Docs Error Reporting Incorrect or improved errors from pandas

Comments

@jorisvandenbossche
Copy link
Member

xref #10674 (comment)

When using :okexcept:, limit the traceback to one line (or as a separate option + try to push to ipython upstream afterwards)

@jorisvandenbossche
Copy link
Member Author

Basically, I think just need to add something like:

 if is_okexcept and "Traceback" in output:
    output = truncated(output)

here: https://github.com/pydata/pandas/blob/master/doc/sphinxext/ipython_sphinxext/ipython_directive.py#L482

@terrytangyuan
Copy link
Contributor

Hi Joris @jorisvandenbossche, how would this output get truncated? So output is a list. Do you want only the first element (output[0]) or?

@jorisvandenbossche
Copy link
Member Author

@terrytangyuan sorry, I apparantly didn't link to this issue properly, but there is already a PR for this: #10727 is merged, but also reverted because it failed for some reason on travis. And a second try here: #10925.
For some reason, this still does not work on travis (locally it all works for me). So if you want to try that out locally, always welcome!

@jreback jreback modified the milestones: 0.17.0, 0.17.1 Oct 2, 2015
@jreback jreback modified the milestones: Next Major Release, 0.17.1 Nov 13, 2015
@jbrockmendel jbrockmendel added the Error Reporting Incorrect or improved errors from pandas label Jul 23, 2019
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants