Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Should initialization errors be exposed to the user?

Aberta
#1,408 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
25/100
Tipo de issue
Funcionalidade
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
jupyter-notebook, python
Domínio
backend

Direção de pesquisa

Comece lendo os caminhos de inicialização em ipykernel/kernelapp.py e IPython/core/shellapp.py vinculados na issue, concentrando-se em como as falhas de exec_lines são tratadas e suprimidas. Determine a forma pretendida de fazer com que os erros de inicialização cheguem ao console do notebook e, em seguida, defina testes e critérios de aceitação para exibir esses erros sem anexá-los à saída da primeira célula.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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
Linguagem predominante
Python
Estrelas
734
Forks
411
Merge médio
1d 2h
PRs com merge (30d)
9

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de ipython/ipykernel

Todas as issues de ipython/ipykernel

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.