Forums

Dead Kernel, Jupyter Notebook

Hello, I have created my first Jupyter Notebook but it keeps displaying the message below along with the error log. I cancelled all running consoles, which had no affect. Can you advise what the problem is? Many thanks.

<pre><code> Dead kernel

The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are 
not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work 
until the notebook is reopened.

</code></pre> <pre><code>

Traceback (most recent call last):

File "/usr/lib/python3.4/site-packages/notebook/base/handlers.py", line 457, in wrapper

result = yield gen.maybe_future(method(self, *args, **kwargs))

File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 1055, in run

value = future.result()

File "/usr/lib/python3.4/site-packages/tornado/concurrent.py", line 238, in result

raise_exc_info(self._exc_info)

File "<string>", line 4, in raise_exc_info

File "/usr/lib/python3.4/site-packages/tornado/gen.py", line 1069, in run

yielded = self.gen.send(value)

File "/usr/lib/python3.4/site-packages/notebook/services/sessions/handlers.py", line 57, in post

model = yield gen.maybe_future(sm.get_session(path=path))

File "/usr/lib/python3.4/site-packages/notebook/services/sessions/sessionmanager.py", line 166, in 
get_session

return self.row_to_model(row)


File "/usr/lib/python3.4/site-packages/notebook/services/sessions/sessionmanager.py", line 205, in

row_to_model

raise KeyError

KeyError

</code></pre>

Out of curiosity, can you try logging out and logging in again?

@conrad Thanks for the suggestions. I have tried logging out and back in but it did not change anything; I'm getting the same problem.

another thing to check- do you get this error say only at work (vs at home/on a different network)?

I was getting the error message at home and at work. I deleted all files and tried creating a new notebook. Now I get a new, different error message when creating a notebook. https://ibb.co/mCbN6FX

That sounds like you're using a notebook that's not compatible with the version of the system we have installed on PythonAnywhere :-(

Which version is supported? I am getting the error when I try to create a notebook from the Python Anywhere Dashboard.

Oh, I see -- that should certainly work. Have you pip installed any Jupyter-related modules into your account?

Not that I am aware of. Would it be easier to reset my image and see if that resolves the problem? I have copied the few files I want to keep onto my computer.

One more thing to double check before we go with the nuclear option of resetting everything. When you get the new error message, is that from opening a notebook that you uploaded? Or is it from creating a brand new notebook from our file interface?

When I create a new notebook. I don't have any existing notebooks to open.

Looking at your running processes from your console tab, I see two processes that were started 2019-02-02. I believe you did not kill the jupyter processes that you thought you had killed. In particular, the processes starting with

/usr/local/bin/python3.4 /usr/bin/jupyterhub-singleuser --user=moonbrain

Looks like the culprit here. You should stop that process and try again.

Ah! That would also explain why I keep being put in the tarpit! I have killed the processes and will try creating a notebook tomorrow. Thanks for the help.