Skip to content

Kernel crashes after any unhandled exception #370

@giantamoeba

Description

@giantamoeba

I have been experiencing this strange problem after updating to version 5.0 (5.1.0 still has the problem). All runs fine on version 4.9.

Minimal Example:

import sys
from PyQt5.QtWidgets import QApplication

from qtconsole.rich_ipython_widget import RichJupyterWidget
from qtconsole.inprocess import QtInProcessKernelManager

app = QApplication(sys.argv)

kernel_manager = QtInProcessKernelManager()
kernel_manager.start_kernel()
kernel = kernel_manager.kernel
kernel.gui = 'qt'

kernel_client = kernel_manager.client()
kernel_client.start_channels()

widget = RichJupyterWidget()

widget.kernel_manager = kernel_manager
widget.kernel_client = kernel_client

widget.show()

sys.exit(app.exec_())

Then in the console, raise any exception:

In [1]: raise RuntimeError('ohai')
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-1-dba2c2e9b9ef> in <module>
----> 1 raise RuntimeError('ohai')

RuntimeError: ohai

In [2]: print()
ERROR: execution aborted

Has anyone else experienced this problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions