Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Unable to communicate with the jupyterlab-dash JupyterLab extension. #24

Open
sangeetsaurabh opened this issue Apr 14, 2019 · 22 comments
Open

Comments

@sangeetsaurabh
Copy link

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

@ghost
Copy link

ghost commented May 9, 2019

the same question here.

@zmays
Copy link

zmays commented Jun 3, 2019

@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.)?

@ryanlovett
Copy link

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.

@csinva
Copy link

csinva commented Jul 15, 2019

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.

@fluentlydata
Copy link

same here.

@hottwaj
Copy link

hottwaj commented Aug 7, 2019

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)

@billgreenwald
Copy link

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

@raghavendrajain
Copy link

@billgreenwald What do you mean by "re-activate the plugin". How do you do that? Does it mean rebuild ?

@billgreenwald
Copy link

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.

@raghavendrajain
Copy link

raghavendrajain commented Nov 11, 2019

@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

@billgreenwald
Copy link

billgreenwald commented Nov 21, 2019

I tried @raghavendrajain's suggestion and it worked, for anyone in the future trying things

@raghavendrajain
Copy link

@sangeetsaurabh Can you please try the solution @billgreenwald and myself tried and if successful, please close the issue. Thank you!

@jconlon
Copy link

jconlon commented Jan 23, 2020

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)

@hottwaj
Copy link

hottwaj commented Jan 24, 2020

Have you tried upgrading ipython & ipykernel (if not already up to date)?

@jconlon
Copy link

jconlon commented Jan 24, 2020

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)

@raghavendrajain
Copy link

@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.

@jconlon
Copy link

jconlon commented Jan 29, 2020

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

@raghavendrajain
Copy link

raghavendrajain commented Jan 29, 2020

@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.

@jconlon
Copy link

jconlon commented Jan 29, 2020

Hi @raghavendrajain

Right, I/O error on my part. Its working now.

thanks!

@mhavu
Copy link

mhavu commented Apr 8, 2020

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?

@raghavendrajain
Copy link

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.

@zain910128
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests