higlass / scipy19

Slides and demos from our SciPyConf 2019 talk
https://speakerdeck.com/flekschas/to-a-billion-and-beyond-how-to-visually-explore-compare-and-share-large-quantitative-datasets-with-higlass
MIT License
13 stars 3 forks source link

"Error displaying widget" error under OS X 10.14.5 #1

Closed alexpreynolds closed 5 years ago

alexpreynolds commented 5 years ago

I updated the Conda environment:

conda update -n base conda

I then installed OSXFUSE v3.10.3.

I created the environment required for the scipy19 notebooks:

git clone https://github.com/higlass/scipy19
cd scipy19
conda env create -f environment.yml

I activated the environment and installed the two jupyter extensions:

conda activate higlass-scipy19
jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install higlass-jupyter

Jupyter starts up properly:

jupyter-lab

I opened the basic and genomics notebooks and tried running them. In both cases, I get an error "Error displaying widget":

Untitled

Here is the terminal log:

(higlass-scipy19) areynolds-macbook:scipy19 areynolds$ jupyter-lab
[I 14:46:02.184 LabApp] JupyterLab extension loaded from /Users/areynolds/anaconda3/envs/higlass-scipy19/lib/python3.7/site-packages/jupyterlab
[I 14:46:02.184 LabApp] JupyterLab application directory is /Users/areynolds/anaconda3/envs/higlass-scipy19/share/jupyter/lab
[I 14:46:02.186 LabApp] Serving notebooks from local directory: /Users/areynolds/Developer/Github/scipy19
[I 14:46:02.186 LabApp] The Jupyter Notebook is running at:
[I 14:46:02.186 LabApp] http://localhost:8888/?token=dfb55994ac61d44cc8289c7716cfc29d9b1b184be4dc344f
[I 14:46:02.186 LabApp]  or http://127.0.0.1:8888/?token=dfb55994ac61d44cc8289c7716cfc29d9b1b184be4dc344f
[I 14:46:02.186 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:46:02.198 LabApp] 

    To access the notebook, open this file in a browser:
        file:///Users/areynolds/Library/Jupyter/runtime/nbserver-19224-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=dfb55994ac61d44cc8289c7716cfc29d9b1b184be4dc344f
     or http://127.0.0.1:8888/?token=dfb55994ac61d44cc8289c7716cfc29d9b1b184be4dc344f
[W 14:46:16.562 LabApp] Notebook basic-setup.ipynb is not trusted
[I 14:46:16.740 LabApp] Kernel started: c73a5123-8551-41d4-b0f2-6acbcf8df212
[I 14:46:16.809 LabApp] Node v10.15.3

[I 14:46:16.819 LabApp] Build is up to date
[W 14:47:04.122 LabApp] Notebook genomics.ipynb is not trusted
[I 14:47:04.364 LabApp] Kernel started: 402e0a9e-2899-4630-bad9-00c44ac7bbb3
[I 14:48:16.718 LabApp] Saving file at /basic-setup.ipynb
[I 14:49:05.450 LabApp] Saving file at /genomics.ipynb
[W 14:49:05.450 LabApp] Notebook genomics.ipynb is not trusted

I don't know if the Notebook foo.ipyn is not trusted message is relevant. Otherwise the Jupyter session transcript appeared normal.

flekschas commented 5 years ago

Could you check what the web console output is? This seems to be an issue with loading the widget.

alexpreynolds commented 5 years ago

Here is the web console output:


vendors~main.1c02ceaecd56e4fd82a1.js:43957 Plugin 'jupyter.extensions.higlass-jupyter' failed to activate.
(anonymous) @ vendors~main.1c02ceaecd56e4fd82a1.js:43957
vendors~main.1c02ceaecd56e4fd82a1.js:43958 Error: No provider for: jupyter.extensions.jupyterWidgetRegistry.
    at JupyterLab.push.2R+v.Application.resolveRequiredService (vendors~main.1c02ceaecd56e4fd82a1.js:43872)
    at vendors~main.1c02ceaecd56e4fd82a1.js:43830
    at Array.map (<anonymous>)
    at JupyterLab.push.2R+v.Application.activatePlugin (vendors~main.1c02ceaecd56e4fd82a1.js:43830)
    at vendors~main.1c02ceaecd56e4fd82a1.js:43956
    at Array.map (<anonymous>)
    at JupyterLab.push.2R+v.Application.start (vendors~main.1c02ceaecd56e4fd82a1.js:43955)
    at main (main.8151b2d4dd3710abba13.js:1648)
(anonymous) @ vendors~main.1c02ceaecd56e4fd82a1.js:43958
vendors~main.1c02ceaecd56e4fd82a1.js:398328 Starting application in workspace: /lab
2vendors~main.1c02ceaecd56e4fd82a1.js:352031 Starting WebSocket: ws://localhost:8888/api/kernels/0c5efa91-f1b6-4cbd-8a50-64b887d125cb
2vendors~main.1c02ceaecd56e4fd82a1.js:352031 Starting WebSocket: ws://localhost:8888/api/kernels/3eb3039f-6405-45de-bf5e-2d5b138e3609
2vendors~main.1c02ceaecd56e4fd82a1.js:353395 Kernel: connected (0c5efa91-f1b6-4cbd-8a50-64b887d125cb)
2vendors~main.1c02ceaecd56e4fd82a1.js:353395 Kernel: connected (3eb3039f-6405-45de-bf5e-2d5b138e3609)
[Violation] 'setInterval' handler took 56ms
Fetch finished loading: GET "<URL>".``
alexpreynolds commented 5 years ago

Re-doing things here with post-Slack discussion with Fritz to see what happens...

  1. Running the environment setup step brings in higlass-python 0.2.1
$ conda env create -f environment.yml
...
$ conda activate higlass-scipy19
$ pip freeze | grep higlass
higlass-python==0.2.1
  1. However, the jupyter plug-in is at 0.2.0:
$ jupyter labextension install higlass-jupyter
...
$ jupyter labextension list
JupyterLab v0.35.6
Known labextensions:
   app dir: /Users/areynolds/anaconda3/envs/higlass-scipy19/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v0.38.1  enabled  OK
        higlass-jupyter v0.2.0  enabled  OK
  1. Specifying 0.2.1 works:
$ jupyter labextension install higlass-jupyter@0.2.1
...
$ jupyter labextension list
JupyterLab v0.35.6
Known labextensions:
   app dir: /Users/areynolds/anaconda3/envs/higlass-scipy19/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v0.38.1  enabled  OK
        higlass-jupyter v0.2.1  enabled  OK
  1. I still get the same "Error displaying widget" error, even when using the "Kernel > Restart Kernel and Run All Cells..." menu:

Web console

Notebook

alexpreynolds commented 5 years ago

Modifying environment.yml per the working higlass-multiconnect environment got this working. I'll submit a PR.