R suddenly doesn't work on my Jupyter Notebook

Viewed 694

I was using IRkernel on the Jupyter Notebook well until a couple of days ago, but it suddenly does not work anymore.

When I open a R file which has an extension form '.ipynb' on the Jupyter Notebook, I experience these:

(on Browser window)

  • 'connecting to kernel' message appears on the right-upper side
  • sandglass appears on the Chrome tab

(on Anaconda 3-like prompt)

  • Below messages appear:

[W 23:18:04.397 NotebookApp] 404 GET /api/kernels/aac5d552-e895-4448-baed-c1b5569f3ede/channels?session_id=f85b1df7aae945908e97925c86e14b84 (127.0.0.1): Kernel does not exist: aac5d552-e895-4448-baed-c1b5569f3ede [W 23:18:04.516 NotebookApp] 404 GET /api/kernels/aac5d552-e895-4448-baed-c1b5569f3ede/channels?session_id=f85b1df7aae945908e97925c86e14b84 (127.0.0.1) 129.80ms referer=None [I 23:18:21.116 NotebookApp] 302 GET /?token=ae4b207e1badc72114c930b20e766a03e82cc40e2f292a6c (127.0.0.1) 0.78ms

[I 23:20:28.519 NotebookApp] 302 GET /?token=ae4b207e1badc72114c930b20e766a03e82cc40e2f292a6c (127.0.0.1) 1.00ms [I 23:20:34.014 NotebookApp] Creating new notebook in /1UM [I 23:20:36.740 NotebookApp] Kernel started: 53b78e5d-ced7-46a9-817a-1f19340a50f6 Error in open.connection(con, "rb") : cannot open the connection Calls: ... parse_and_simplify -> parseJSON -> parse_con -> open -> open.connection

I installed IR kernel several times following the guide on https://irkernel.github.io/installation/.

What can I do?

1 Answers

This can be down to a number of issues such whether you have updated your python version or the libraries that jupyter depends upon - you can check which libraries python need updating with pip3 list --outdated. It can also be related to extensions if you have them installed - ensure they are also up to date (see related question). Also ensure that the R kernel is still listed - jupyter kernelspec list.

If such things haven't changed then sometimes the browser can get into a strange state and the problem can be cured by just restarting the browser, or try with a different browser. Also it may be worth looking in the browser's dev-tools console for any Javascript errors.

Related