Failed to start the kernel error on python notebooks with KeyErrors

Antal Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 85 Neuron
edited July 16 in Using Dataiku

I've been experiencing kernel errors with python notebooks.

Sometimes a notebook will not be able to start a kernel anymore. For example after a kernel dies and I try to restart it.

After that ,for that notebook, no kernel/code env will work anymore. Not even kernels that worked with it previously.

Sometimes making a copy of the notebook helps, but not always.

The problem seems very intermittent.

The reported errors (in Jupyter) are always of the form:

Traceback (most recent call last):
  File "/opt/dss/dataiku-dss-11.2.0/python37.packages/tornado/", line 1592, in _execute
    result = yield result
  File "/opt/dss/dataiku-dss-11.2.0/python37.packages/tornado/", line 1133, in run
    value = future.result()
  File "/opt/dss/dataiku-dss-11.2.0/python37.packages/tornado/", line 1147, in run
    yielded = self.gen.send(value)
  File "/opt/dss/dataiku-dss-11.2.0/dku-jupyter/packages/notebook/services/sessions/", line 73, in post
    model = yield gen.maybe_future(sm.get_session(path=session_virtual_path))
  File "/opt/dss/dataiku-dss-11.2.0/dku-jupyter/packages/notebook/services/sessions/", line 176, in get_session
    return self.row_to_model(row)
  File "/opt/dss/dataiku-dss-11.2.0/dku-jupyter/packages/notebook/services/sessions/", line 223, in row_to_model
    'kernel': self.kernel_manager.kernel_model(row['kernel_id'])
  File "/opt/dss/dataiku-dss-11.2.0/dku-jupyter/packages/notebook/services/kernels/", line 333, in kernel_model
    "connections": self._kernel_connections[kernel_id],
KeyError: '7210d703-fbc6-47f4-bf85-2b2547e2b224'

citing a KeyError

Is there any way to make the notebooks work with (any) kernel again?

Operating system used: Windows 10



Setup Info
      Help me…