Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clustergrammer2 0.5.18 not working with jupyterlab 2.0.1 #61

Closed
matrs opened this issue Apr 3, 2020 · 11 comments
Closed

Clustergrammer2 0.5.18 not working with jupyterlab 2.0.1 #61

matrs opened this issue Apr 3, 2020 · 11 comments

Comments

@matrs
Copy link

matrs commented Apr 3, 2020

Describe the bug
I tried the last version of clustergrammer2 in a fresh conda environment with the last version of jupyterlab. I installed clustergrammer and activated the lab extension using the instructions from the README.md,

$ pip install clustergrammer2
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager

and this is what i have:

$ conda list | egrep  'python |ipywidgets|jupyterlab|clustergrammer'
clustergrammer2           0.5.18                   pypi_0    pypi
ipython                   7.13.0           py37hc8dfbb8_2    conda-forge
ipywidgets                7.5.1                      py_0    conda-forge
jupyterlab                2.0.1                      py_0    conda-forge
jupyterlab_server         1.1.0                      py_0    conda-forge
python                    3.7.6           h8356626_5_cpython    conda-forge

when i tried to use it in jupyterlab notebook I got: (This is just an excerpt)

react_devtools_backend.js:6 Plugin 'jupyter.extensions.clustergrammer2' failed to activate.
r	@	react_devtools_backend.js:6
(anonymous)	@	index.js:276
Promise.catch (async)		
(anonymous)	@	index.js:275
e.start	@	index.js:274
o	@	index.out.js:1011
load (async)	
...
...
(anonymous)	@	vendors~main.535a1ca….js:2
react_devtools_backend.js:6 Error: No provider for: jupyter.extensions.jupyterWidgetRegistry.
    at f.e.resolveRequiredService (index.js:191)
    at index.js:149

When i checked the extensions installed, I got:

$ jupyter labextension list
JupyterLab v2.0.1
Known labextensions:
   app dir: /home/mibu/miniconda3/envs/py_almost-update/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        clustergrammer2 v0.5.17  enabled  OK

An odd thing is that says clustergrammer2 v0.5.17 even though i have 0.5.18 installed. I uninstalled the extension and reinstalled using other method:

$ jupyter labextension install clustergrammer2
Building jupyterlab assets (build:prod:minimize)
$ jupyter labextension list
JupyterLab v2.0.1
Known labextensions:
   app dir: /home/mibu/miniconda3/envs/py37/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        clustergrammer2 v0.5.18  enabled  OK

But still I'm getting the same js error. I tried multiple times with fresh environments, installing directly the extension using jupyter labextension install clustergrammer2 to avoid getting the wrong version of it but that doesn't help. The widget does work in notebook 6.0.3 and in jupyter-lab 1.2.7 following the instructions from the README

Desktop (please complete the following information):

  • OS: Linux 5.5.13-1-MANJARO
  • Chrome 80.0.3987.162

Full javascript error:

react_devtools_backend.js:6 Plugin 'jupyter.extensions.clustergrammer2' failed to activate.
r	@	react_devtools_backend.js:6
(anonymous)	@	index.js:276
Promise.catch (async)		
(anonymous)	@	index.js:275
e.start	@	index.js:274
o	@	index.out.js:1011
load (async)		
ANye	@	index.out.js:1057
a	@	bootstrap:84
0	@	main.ca893ad….js:1
a	@	bootstrap:84
r	@	bootstrap:45
i	@	bootstrap:32
(anonymous)	@	vendors~main.535a1ca….js:2
react_devtools_backend.js:6 Error: No provider for: jupyter.extensions.jupyterWidgetRegistry.
    at f.e.resolveRequiredService (index.js:191)
    at index.js:149
    at Array.map (<anonymous>)
    at f.e.activatePlugin (index.js:149)
    at index.js:275
    at Array.map (<anonymous>)
    at f.e.start (index.js:274)
    at o (index.out.js:1011)
r	@	react_devtools_backend.js:6
(anonymous)	@	index.js:277
Promise.catch (async)		
(anonymous)	@	index.js:275
e.start	@	index.js:274
o	@	index.out.js:1011
load (async)		
ANye	@	index.out.js:1057
a	@	bootstrap:84
0	@	main.ca893ad….js:1
a	@	bootstrap:84
r	@	bootstrap:45
i	@	bootstrap:32
(anonymous)	@	vendors~main.535a1ca….js:2
@cornhundred
Copy link
Contributor

Hi @matrs, I think 0.5.18 did not build the Jupyter Lab extension correctly. I'll let you know when I release 0.5.19. Or you could try 0.5.17, which should work on Jupyter Lab.

@matrs
Copy link
Author

matrs commented Apr 7, 2020

Just to clarify, when I try the setup instructions from the readme, it does install 0.5.17 but it doesn't work, that's why I tried other options. For me, 0.5.17/18 works in the lastest jupyter notebook and jupyterlab 1.2.7 which is the last 1.x available in conda . So this setup doesn't work for me:

$ jupyter labextension list
JupyterLab v2.0.1
Known labextensions:
   app dir: /home/mibu/miniconda3/envs/bif/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        clustergrammer2 v0.5.17  enabled  OK

@cornhundred
Copy link
Contributor

@matrs, so you tried pinning the installation version with pip install clustergrammer==0.5.17 and it doesn't work? We'll be releasing a new version probably in the next week that should take care of the Jupyter Lab installation issue. We'll keep you updated.

@matrs
Copy link
Author

matrs commented Apr 9, 2020

I think i already tried that but I just did it again to be sure, in a clean environment It doesn't work:

$ conda list | egrep 'cluster|lab|jupyter|notebook'
clustergrammer2           0.5.17                   pypi_0    pypi
jupyter_client            6.1.2                      py_0    conda-forge
jupyter_core              4.6.3            py37hc8dfbb8_1    conda-forge
jupyterlab                2.1.0                      py_0    conda-forge
jupyterlab_server         1.1.0                      py_1    conda-forge
notebook                  6.0.3                    py37_0    conda-forge

$ jupyter labextension list
JupyterLab v2.1.0
Known labextensions:
   app dir: /home/mibu/miniconda3/envs/py37/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        clustergrammer2 v0.5.17  enabled  OK
Plugin 'jupyter.extensions.clustergrammer2' failed to activate.
(anonymous)	@	index.js:276
index.js:277 Error: No provider for: jupyter.extensions.jupyterWidgetRegistry.
    at f.e.resolveRequiredService (index.js:191)
    at index.js:149
    at Array.map (<anonymous>)
    at f.e.activatePlugin (index.js:149)
    at index.js:275
    at Array.map (<anonymous>)
    at f.e.start (index.js:274)
    at o (index.out.js:1035)
(anonymous)	@	index.js:277

It's always the problem with the registry, the thing is that clustergrammer2 0.5.17 and 0.5.18 work with jupyterlab 1.x and the last notebook

Edit: I just noticed that in this try i'm using jupyterlab 2.1 and not 2.0.1, it's because they just released it and it's a fresh installation so conda picked that. Anyways, it's the same problem with 2.1 - 2.0.1 and clustergrammer2 0.5.17 - 0.5.18. Also, when i searched for this problem, i did found errors form other widgets related to jupyterlab 2 and jupyter.extensions.jupyterWidgetRegistry

@cornhundred
Copy link
Contributor

cornhundred commented Apr 10, 2020

Thanks for checking that again. We'll let you know if we can get it working again in the next release

@cornhundred
Copy link
Contributor

cornhundred commented Apr 14, 2020

The issue might be related to this https://gitter.im/jupyter-widgets/Lobby?at=5e5dac8aec379e558ea01d6e

Quoting from gitter

Jason Grout @jasongrout Mar 02 20:51
I just published final versions of the npm packages to work in JupyterLab 2.0.
This message was deleted
@/all - ipywidgets now works in the newly released JupyterLab: jupyter labextension install @jupyter-widgets/jupyterlab-manager
Jason Grout @jasongrout Mar 02 21:02
@/all - For custom widget authors - I anticipate that all you need to do to add JupyterLab 2.0 support is publish a patch release of your npm package, adding || ^3 to your @jupyter-widgets/base dependency versions
For example, your dependency can look like:
"dependencies": {
"@jupyter-widgets/base": "^1 || ^2 || ^3"

@LustigePerson
Copy link

Any Updates on this? We are about to Upgrade FASTGenomics to jlab 2.* but the widget seems not to work. I tested 0.5.19 and also 0.5.17-0.5.15 to make sure.

@cornhundred
Copy link
Contributor

Hi @LustigePerson, I have not had time to try the approach outlined in the previous comment, but I will try it out in the next few days and let you all know. Thanks for your patience on this.

@cornhundred
Copy link
Contributor

The new release of Clustergrammer2 0.5.21 appears to be working in Jupyter Lab 2.0

Screen Shot 2020-05-05 at 8 39 38 PM

The change I made was here https://github.com/ismms-himc/clustergrammer2/blob/master/package.json#L48

Based on the recommendation from @jasongrout from gitter.

Let me know if it works for you @LustigePerson @matrs.

@LustigePerson
Copy link

Yes, it works. Thanks for the fast fix. It will be in the next FASTGenomics release alongside the new jlab.

@matrs
Copy link
Author

matrs commented May 6, 2020

Thanks!

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

No branches or pull requests

3 participants