Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Should initialization errors be exposed to the user?

Open
#1,408 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
jupyter-notebook, python
Domain
backend

Research direction

Start by reading the initialization paths in ipykernel/kernelapp.py and IPython/core/shellapp.py linked in the issue, focusing on how exec_lines failures are handled and suppressed. Determine the intended way for initialization errors to reach the notebook console, then define tests and acceptance criteria for displaying those errors without attaching them to the first cell's output.

Written by the indexing model from the issue text.

Description

Currently, if user configures InteractiveShellApp.exec_lines and it fails, there is no way for them to see the error in notebook.

For example set c.InteractiveShellApp.exec_lines=["raise ValueError()"].

This is visible in IPython/jupyter-server because it gets written to the terminal, but it does not show up in the notebook. There is even explicit code making sure that it won't be attached to the output of the first cell once it gets run:

https://github.com/ipython/ipykernel/blob/84211d7227fd5faa9d6e485641c1a4df6e7df2b4/ipykernel/kernelapp.py#L730-L737

With code to the same effect in IPython itself: https://github.com/ipython/ipython/blob/cc614bdc1d3f61303e265c26d593d384e4a90d1e/IPython/core/shellapp.py#L341-L360

I wonder if we should emit a special message for any output so that it would be shown in the Notebook console? The same way as unhandled ipywidget messages land in the console?

I mean this log console:

Image
Dominant language
Python
Stars
734
Forks
411
Avg merge
1d 2h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ipython/ipykernel

All issues in ipython/ipykernel

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.