jupyterlab-lsp
jupyterlab-lsp copied to clipboard
Exception with tornado 6.2
I installed jupyterlab-lsp in a new virtual machine. It will automatically install tornado 6.2 as dependency (Released: Jul 4, 2022 on Pypi). While running jupyter-lab it will produce the following error
Exception in callback Task.task_wakeup(<Future finished result=None>)
handle: <Handle Task.task_wakeup(<Future finished result=None>)>
Traceback (most recent call last):
File "/usr/lib64/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
RuntimeError: Cannot enter into task <Task pending name='Task-155' coro=<LanguageServerSession._read_lsp() running at /home/user/.local/lib/python3.10/site-packages/jupyter_lsp/session.py:167> wait_for=<Future finished result=None>> while another task <Task pending name='Task-1198' coro=<PeriodicCallback._run() running at /home/user/.local/lib/python3.10/site-packages/tornado/ioloop.py:921> cb=[IOLoop.add_future.<locals>.<lambda>() at /home/user/.local/lib/python3.10/site-packages/tornado/ioloop.py:694]> is being executed.
^CTraceback (most recent call last):
File "/usr/lib64/python3.10/runpy.py", line 196, in _run_module_as_main
after the error no suggestions will be shown anymore from jupyterlab-lsp. The only way to get back any functionality is to restart jupyter-lab.
The issue is fixed by downgrading tornado via
pip install tornado==6.1
Package versions
$ jupyter --version
Selected Jupyter core packages...
IPython : 8.4.0
ipykernel : 6.15.0
ipywidgets : not installed
jupyter_client : 7.3.4
jupyter_core : 4.10.0
jupyter_server : 1.18.0
jupyterlab : 3.4.3
nbclient : 0.6.6
nbconvert : 6.5.0
nbformat : 5.4.0
notebook : 6.4.12
qtconsole : not installed
traitlets : 5.3.0
$ jupyter labextension krassowski/jupyterlab-lsp --version
3.4.3
pips
$ pip list
Package Version
--------------------------------- --------
anyio 3.6.1
argcomplete 2.0.0
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
astroid 2.11.6
asttokens 2.0.5
attrs 21.4.0
autopep8 1.6.0
Babel 2.10.3
backcall 0.2.0
Beaker 1.10.0
beautifulsoup4 4.11.0
black 22.6.0
bleach 5.0.1
blivet 3.4.4
blivet-gui 2.3.0
Brlapi 0.8.3
cffi 1.15.0
chardet 4.0.0
charset-normalizer 2.0.11
chrome-gnome-shell 0.0.0
click 8.0.4
cryptography 36.0.0
cupshelpers 1.0
dasbus 1.6
dbus-python 1.2.18
debugpy 1.6.0
decorator 5.1.1
defusedxml 0.7.1
dill 0.3.5.1
distlib 0.3.4
distro 1.6.0
entrypoints 0.4
executing 0.8.3
fastjsonschema 2.15.3
fedora-third-party 0.10
filelock 3.3.1
flake8 4.0.1
fros 1.1
gpg 1.15.1
humanize 3.13.1
idna 3.3
ipykernel 6.15.0
ipython 8.4.0
ipython-genutils 0.2.0
isort 5.10.1
jedi 0.18.1
Jinja2 3.1.2
json5 0.9.8
jsonschema 4.6.1
jupyter-client 7.3.4
jupyter-contrib-core 0.3.3
jupyter-core 4.10.0
jupyter-highlight-selected-word 0.2.0
jupyter-lsp 1.5.1
jupyter-nbextensions-configurator 0.4.1
jupyter-server 1.18.0
jupyterlab 3.4.3
jupyterlab-code-formatter 1.4.11
jupyterlab-lsp 3.10.1
jupyterlab-pygments 0.2.2
jupyterlab-server 2.14.0
langtable 0.0.58
lazy-object-proxy 1.7.1
libcomps 0.1.18
lxml 4.7.1
Mako 1.1.4
MarkupSafe 2.0.0
matplotlib-inline 0.1.3
mccabe 0.6.1
mistune 0.8.4
mypy-extensions 0.4.3
nbclassic 0.4.0
nbclient 0.6.6
nbconvert 6.5.0
nbformat 5.4.0
nest-asyncio 1.5.5
nftables 0.1
notebook 6.4.12
notebook-shim 0.1.0
olefile 0.46
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
Paste 3.5.0
pathspec 0.9.0
pexpect 4.8.0
pickleshare 0.7.5
pid 2.2.3
Pillow 9.1.0
pip 22.1.2
platformdirs 2.5.2
pluggy 1.0.0
ply 3.11
productmd 1.33
prometheus-client 0.14.1
prompt-toolkit 3.0.30
psutil 5.9.1
ptyprocess 0.6.0
pure-eval 0.2.2
pwquality 1.4.4
pycairo 1.21.0
pycodestyle 2.8.0
pycparser 2.20
pycrypto 2.6.1
pycups 2.0.1
pycurl 7.45.1
pydocstyle 6.1.1
pyenchant 3.2.2
pyflakes 2.4.0
Pygments 2.12.0
PyGObject 3.42.1
pykickstart 3.36
pylint 2.14.4
pyOpenSSL 21.0.0
pyparsing 2.4.7
pyparted 3.12.0
pyrsistent 0.18.1
PySocks 1.7.1
python-augeas 1.1.0
python-dateutil 2.8.2
python-lsp-jsonrpc 1.0.0
python-lsp-server 1.4.1
python-meh 0.50
pytoolconfig 1.2.1
pytz 2022.1
pyudev 0.22.0
pyxdg 0.27
PyYAML 6.0
pyzmq 23.2.0
regex 2022.6.2
requests 2.27.1
requests-file 1.5.1
requests-ftp 0.3.1
rope 1.2.0
rpm 4.17.0
selinux 3.3
Send2Trash 1.8.0
sepolicy 3.3
setools 4.4.0
setuptools 59.6.0
simpleaudio 1.0.4
simpleline 1.9.0
six 1.16.0
sniffio 1.2.0
snowballstemmer 2.2.0
sos 4.3
soupsieve 2.3.1
stack-data 0.3.0
systemd-python 234
Tempita 0.5.2
terminado 0.15.0
tinycss2 1.1.1
toml 0.10.2
tomli 2.0.1
tomlkit 0.11.0
tornado 6.2
traitlets 5.3.0
ujson 5.4.0
urllib3 1.26.8
virtualenv 20.13.4
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.3.3
wrapt 1.14.1
yapf 0.32.0
Interesting, there seem to be problems with tornado 6.2 in general, see: https://github.com/jupyterlab/jupyterlab/issues/11934. Any ideas what change in tornado 6.2 is causing these issues or how to fix them?
there seem to be problems with tornado 6.2 in general
I believe in the jlab issue you linked it's the other way around: 6.1 was problematic and 6.2 magically fixed things. I also see the same behavior (sporadic opening problems in 6.1 and lsp not working in 6.2).
I had a look into it a while ago but I do not understand tornado and therefore do not know whats causing the error.
Using a new installation of jupyterlab and jupyterlab-lsp the error can not be reproduced. Whatever have fixed it, it seems to be fixed as I tested it on different machines. So you might consider closing this issue?
Thanks for the update, Closing as resolved upstream, but please let us know if it re-emerges.