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

Incomplete tracebacks for ExceptionGroup #14998

Closed
jacobj45 opened this issue Aug 21, 2023 · 3 comments
Closed

Incomplete tracebacks for ExceptionGroup #14998

jacobj45 opened this issue Aug 21, 2023 · 3 comments
Labels
bug status:Needs Triage Applied to new issues that need triage

Comments

@jacobj45
Copy link

Description

Tracebacks for ExceptionGroups are incomplete and different from when these exceptions are raised within a script.

Reproduce

  1. Run the following in a Jupyter cell:
eg = ExceptionGroup(
    "one",
    [
        ValueError(111),
        TypeError(333),
    ],
)
raise eg

Observed behavior

Full traceback is not present when running the above snippet from JupyterLab:

. . .
----> 8 raise eg

ExceptionGroup: one (2 sub-exceptions)

Expected behavior

You get the expected behaviour when running the same snippet from a Python script:

. . .
|     raise eg
  | ExceptionGroup: one (2 sub-exceptions)
  +-+---------------- 1 ----------------
    | ValueError: 111
    +---------------- 2 ----------------
    | TypeError: 333
    +------------------------------------

Context

  • JupyterLab version: 4.0.5
  • Python version: 3.11.4
@jacobj45 jacobj45 added the bug label Aug 21, 2023
@welcome
Copy link

welcome bot commented Aug 21, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Aug 21, 2023
@krassowski
Copy link
Member

The tracebacks are generated by the kernel, in this case probably ipykernel/IPython. There was an issue about this in IPython (ipython/ipython#13753) which was fixed but not yet released. You can try installing the latest development version of IPython if you like, but I believe this is not an issue in JupyterLab.

@JasonWeill
Copy link
Contributor

@jacobj45 Thank you for your contribution! I'm resolving this in favor of the IPython issue that @krassowski mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status:Needs Triage Applied to new issues that need triage
Projects
None yet
Development

No branches or pull requests

3 participants