I'm currently dealing with some issues with Jupyter Lab. Indeed, I was working on Jupyter Lab, everything was ok at this time, until I had to save my work and reboot. Then Jupyter stops working (either Jupyter Lab and the classic version Jupyter Notebook).
I've tried to fix the problem by many solutions that I've found in other issues, listed below :
tried to install the last version of Python (3.7)
tried to uninstall Jupyter Lab and Notebook
tried to remove my miniconda install from the home path and reinstall all like it was before
tried to reinstall previous versions
tried to downgrade Tornado to previous versions (espicially 4.5.3)
tried to work on nb_conda_kernels
But nothing has fixed the problem ... when I start Jupyter Lab from the terminal the Python 3 kernel stays "Reconnecting" and doesn't allow me to do anything. Also trying to work with Jupyter Notebook lead to a 500 internal error.
I'm ok with the idea to remove all, clean what will need to be cleaned (I've already delete my envs), I just want to be able to work in a Python 3 env with all my librairies.
Got something like that from the terminal
[I 23:50:01.551 LabApp] JupyterLab application directory is /home/sebastien/miniconda3/envs/Projets/share/jupyter/lab
[I 23:50:01.552 LabApp] Serving notebooks from local directory: /home/sebastien
[I 23:50:01.552 LabApp] The Jupyter Notebook is running at:
[I 23:50:01.552 LabApp] http://localhost:8888/?token=8b4c354080ed7c24569321614832b8bc211133d61f3c6eb5
[I 23:50:01.552 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 23:50:01.554 LabApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=8b4c354080ed7c24569321614832b8bc211133d61f3c6eb5
[I 23:50:01.894 LabApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[29807:29828:0305/235001.918031:ERROR:browser_process_sub_thread.cc(209)] Waited 9 ms for network service
Ouverture dans une session de navigateur existante.
[E 23:50:02.765 LabApp] Uncaught exception GET /api/nbconvert?1551826202720 (127.0.0.1)
HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/api/nbconvert?1551826202720', version='HTTP/1.1', remote_ip='127.0.0.1')
Traceback (most recent call last):
File "/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/tornado/web.py", line 1697, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/tornado/web.py", line 3174, in wrapper
return method(self, *args, **kwargs)
File "/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/notebook/services/nbconvert/handlers.py", line 13, in get
from nbconvert.exporters import base
File "/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/nbconvert/__init__.py", line 7, in <module>
from . import postprocessors
File "/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/nbconvert/postprocessors/__init__.py", line 5, in <module>
from .serve import ServePostProcessor
File "/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/nbconvert/postprocessors/serve.py", line 19, in <module>
class ProxyHandler(web.RequestHandler):
File "/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/nbconvert/postprocessors/serve.py", line 21, in ProxyHandler
@web.asynchronous
AttributeError: module 'tornado.web' has no attribute 'asynchronous'
[W 23:50:02.767 LabApp] Unhandled error
[E 23:50:02.769 LabApp] {
"Host": "localhost:8888",
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36",
"Authorization": "token 8b4c354080ed7c24569321614832b8bc211133d61f3c6eb5",
"Content-Type": "application/json",
"Accept": "*/*",
"Referer": "http://localhost:8888/lab",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7",
"Cookie": "_xsrf=2|b3290a35|3cbde79a6ba060d2001272a801a61a08|1551049037; username-localhost-8888=\"2|1:0|10:1551826202|23:username-localhost-8888|44:YTdlZjJmMjJhNzJhNDhkODlhNzZhY2YyNDZkMzlhMjI=|4a56a2e1d6e95a4c8028120e749a84cf1dbdd8fc2826491174fc8e289d8de634\""
}
[E 23:50:02.769 LabApp] 500 GET /api/nbconvert?1551826202720 (127.0.0.1) 42.97ms referer=http://localhost:8888/lab
[I 23:50:03.043 LabApp] Node v8.10.0
[I 23:50:03.045 LabApp] Build is up to date
[I 23:50:04.670 LabApp] Kernel started: 39ae60f5-5aa4-49ae-9626-4c9581f78d0c
[I 23:50:05.086 LabApp] Adapting to protocol v5.1 for kernel 39ae60f5-5aa4-49ae-9626-4c9581f78d0c
/home/sebastien/miniconda3/envs/Projets/lib/python3.6/site-packages/notebook/base/zmqhandlers.py:284: RuntimeWarning: coroutine 'WebSocketHandler.get' was never awaited
super(AuthenticatedZMQStreamHandler, self).get(*args, **kwargs)
[I 23:50:05.101 LabApp] Adapting to protocol v5.1 for kernel 39ae60f5-5aa4-49ae-9626-4c9581f78d0c
[W 23:50:06.091 LabApp] Replacing stale connection: 39ae60f5-5aa4-49ae-9626-4c9581f78d0c:511aaca2-4e7f-4cfa-b9c1-406d82ad5edb
[I 23:52:04.037 LabApp] Saving file at /Untitled1.ipynb
[W 23:54:06.106 LabApp] Replacing stale connection: 39ae60f5-5aa4-49ae-9626-4c9581f78d0c:6d4d6c79-1764-4c5d-aa9f-c899baf4e6d8
[I 23:54:06.116 LabApp] Adapting to protocol v5.1 for kernel 39ae60f5-5aa4-49ae-9626-4c9581f78d0c
[W 23:54:08.034 LabApp] Replacing stale connection: 39ae60f5-5aa4-49ae-9626-4c9581f78d0c:c0c7c9fc-a289-42c2-89e1-e153cacc0ba6