jupyterlab-dash
jupyterlab-dash copied to clipboard
Unable to communicate with the jupyterlab-dash JupyterLab extension.
Hi there,
When I am trying to run Dash in Jupyter Notebook, I am getting following error -
Exception in thread Thread-105: Traceback (most recent call last): File "/Users/ssaurabh/anaconda3/lib/python3.7/threading.py", line 917, in _bootstrap_inner self.run() File "/Users/ssaurabh/anaconda3/lib/python3.7/threading.py", line 1158, in run self.function(*self.args, **self.kwargs) File "/Users/ssaurabh/anaconda3/lib/python3.7/site-packages/jupyterlab_dash/init.py", line 71, in _perform_show """) OSError: Unable to communicate with the jupyterlab-dash JupyterLab extension. Is this Python kernel running inside JupyterLab with the jupyterlab-dash extension installed?
You can install the extension with:
$ jupyter labextension install jupyterlab-dash
Any idea how I need to run my Python Kernel?
Thanks, Sangeet
the same question here.
@sangeetsaurabh can you provide some more details about how you are running your jupyterlab (you say jupyter notebook in your post, but this is a jupyterlab extension) notebook (e.g locally with windows, deployed with jupyterhub, etc.)?
I'm seeing this as well. In my case, my notebook server is launched from a hub and is running lab. I've confirmed that the dash extension is installed and enabled.
I copy/pasted the "Usage" example from the README and the code ran without error, however nothing in the UI changed. The exception was displayed a few seconds after viewer.show(app)
was executed.
I have the same issue - I believe it is related to Jupyterhub specifically. When I run jupyterlab from jupyterhub I get the issue, but when I connect to it via port-forwarding on the same server it works fine.
same here.
I was able to get jupyterlab-dash working on one computer but then hit the same OSError exception listed above when running on a second computer.
I also was getting the following in juptyerlab's output:
[IPKernelApp] WARNING | No such comm: 2a809ee5a5634c858534436ee8973b27
Exception ignored in: <function Comm.__del__ at 0x7fe5a20099d8>
Traceback (most recent call last):
File "/home/jonathan/.pyenv/versions/3.7.2/envs/jupyterlab-3.7.2/lib/python3.7/site-packages/ipykernel/comm/comm.py", line 76, in __del__
File "/home/jonathan/.pyenv/versions/3.7.2/envs/jupyterlab-3.7.2/lib/python3.7/site-packages/ipykernel/comm/comm.py", line 116, in close
File "/home/jonathan/.pyenv/versions/3.7.2/envs/jupyterlab-3.7.2/lib/python3.7/site-packages/ipykernel/comm/manager.py", line 56, in unregister_comm
KeyError: ('2a809ee5a5634c858534436ee8973b27',)
I'm sure this won't work for everyone, but in my case upgrading ipykernel (to 7.7.0 from 7.6.1) fixed things. Thanks!
p.s. I was coming across this issue in a straightforward single user jupyterlab setup (i.e. not running jupyterhub)
Chiming in on this --
I get the error each time I reconnect to the notebook instance. I have to shut down my server, re-activate the plugin, and then re-start the server. Then it works again
@billgreenwald What do you mean by "re-activate the plugin". How do you do that? Does it mean rebuild
?
Each time I wanted to use the extension, I would first re-run
jupyter labextension install [email protected]
And then it would work until I closed the notebook.
However, I reinstalled conda for a different reason, and now it won't work at all. So I don't think my solution was actually anything.
@billgreenwald Thanks for the prompt response! Actually, I could solve the problem and it is working well. I did the Development Installation
. Just followed the steps and everything works smoothly. BTW, I did not use conda
command for installation. All sort of installation related to Dash was done using pip
, even though I am running it inside conda's base environment.
EDIT: The link to the Development Installation
is https://github.com/plotly/jupyterlab-dash#development-installation
I tried @raghavendrajain's suggestion and it worked, for anyone in the future trying things
@sangeetsaurabh Can you please try the solution @billgreenwald and myself tried and if successful, please close the issue. Thank you!
Tried doing a development build following instructions as @billgreenwald and @raghavendrajain suggested from within my Python 3.6.9 virtual environment.
But still get the error.
Here are my libs from a pip list:
dash (1.8.0)
dash-core-components (1.7.0)
dash-html-components (1.0.2)
dash-renderer (1.2.3)
dash-table (4.6.0)
jupyter (1.0.0)
jupyter-client (5.3.4)
jupyter-console (6.1.0)
jupyter-core (4.6.1)
jupyter-server-proxy (1.2.0)
jupyterlab (1.2.5)
jupyterlab-dash (0.1.0a3, /home/jconlon/git/jup-eds/jupyterlab-dash)
jupyterlab-server (1.0.6)
Have you tried upgrading ipython & ipykernel (if not already up to date)?
Here are my ipython versions, I believe they are the latest...
ipykernel (5.1.3)
ipython (7.11.1)
ipython-genutils (0.2.0)
ipywidgets (7.5.1)
@jconlon Hi. Please tell me your OS? I will share my experience a bit more. When I open jupyter lab
and run the sample code given in this link, I must add that this does not always work. I have to refresh the Extensions
a couple of times and reload it. Please try all that. Sorry, my help is not really methodical but this extension does not seem to work that smoothly. However, I did get immense benefit from using it, the speed of prototyping was faster.
Hi @raghavendrajain
Here is my OS:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
I too was trying the simple Usage example, but I always get that error. Now I am inside of a env, at is from that terminal that I start the jupyter notebook
like:
(.venv) jconlon@mudshark:~/git/jup-eds$ jupyter notebook
@jconlon I believe you should not use command jupyter notebook
but should use jupyter lab
to start a notebook from your terminal. The extension belongs to the jupyterlab
, as the name suggests.
Hi @raghavendrajain
Right, I/O error on my part. Its working now.
thanks!
I was running Dash applications in JupyterLab yesterday, but when I restarted JupyterLab today, I ran into this issue. Reinstalling jupyterlab-dash didn't help. I tried development installation as well, since @raghavendrajain and @billgreenwald reported it as a working solution. However, the installation fails when building jupyterlab assets (webpack fails with Error: Cannot find module 'jupyterlab-dash/package.json'
). Any ideas?
Hi @mhavu It happens with me too sometime. I first restart the kernel and usually it works. I never had to go for re-installation.
To add to the discussion,
The issue mentioned by OP occurs for me when i run the python data science notebook image in docker and run jupyter lab in the docker container and then try to install the jupyter lab dash extension.