Failed to start the kernel error on python notebooks with KeyErrors

Antal
Failed to start the kernel error on python notebooks with KeyErrors

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/web.py", line 1592, in _execute
    result = yield result
  File "/opt/dss/dataiku-dss-11.2.0/python37.packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/opt/dss/dataiku-dss-11.2.0/python37.packages/tornado/gen.py", line 1147, in run
    yielded = self.gen.send(value)
  File "/opt/dss/dataiku-dss-11.2.0/dku-jupyter/packages/notebook/services/sessions/handlers.py", 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/sessionmanager.py", 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/sessionmanager.py", 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/kernelmanager.py", 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

0 Kudos
1 Reply
AlexT
Dataiker

Hi @Antal ,

Have you tried force reloading this notebook using the button :


Screen Shot 2023-04-11 at 6.10.30 PM.png

If the issue persists, I can suggest you raise a support ticket with the instance diagnostics. 

Thanks

0 Kudos