graph-notebook icon indicating copy to clipboard operation
graph-notebook copied to clipboard

[BUG] Visualizations fail to work in Jupyter labs

Open ahutter opened this issue 1 year ago • 4 comments

Community Note

  • Please use a 👍 reaction to provide a +1/vote. This helps the community and maintainers prioritize this request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Describe the bug Visualizations fail to render for SPARQL queries in Jupyter Lab. JS errors are present in the console.

  • OS: Ventura 13.5.1
  • Browser: Google Chrome
  • Graph Notebook Version: 3.8.2
  • Graph Database & Version: 1.2.1.0.R5
  • Jupyter Version:
IPython          : 7.34.0
ipykernel        : 5.3.4
ipywidgets       : 7.7.2
jupyter_client   : 7.4.9
jupyter_core     : 4.12.0
jupyter_server   : 1.24.0
jupyterlab       : 3.6.5
nbclient         : 0.7.3
nbconvert        : 7.2.8
nbformat         : 5.8.0
notebook         : 6.4.12
qtconsole        : 5.4.3
traitlets        : 5.9.0

To Reproduce

  1. Run a SPARQL query in Jupyter Lab
  2. Switch to Graph tab

Screenshot 2023-09-15 at 9 43 36 AM

Expected behavior Graph tab has a visualization.

ahutter avatar Sep 15 '23 13:09 ahutter

Hi @ahutter , thanks for submitting a bug report!

I unsuccessfully tried reproducing this, using the same general setup and package versions, as well as:

  • Browser: Chrome v116.0.5845.187 x86_64
  • Python version: 3.10.11

To fish for some possible root causes, could you answer the following:

  1. Is your Mac computer Intel or Apple silicon based?
  2. What Python version are you running?
  3. What is the output of running !jupyter labextension list in a notebook cell?
  4. Was graph-notebook installed onto a clean Python environment (with only JupyterLab3 + dependencies installed)? If no, can you provide the pip list of other dependencies installed in the env?
  5. If there are other packages also running in the env, do any of them also install Jupyter widgets/extensions?
  6. Was graph-notebook installed and launched via the run documentation for JupyterLab? If no, what was the alternative/modified process used?
  7. If you try running the same widget via Jupyter Classic Notebook (with the extra installation steps), does the graph tab visualization render correctly?

michaelnchin avatar Sep 20 '23 03:09 michaelnchin

Hi @michaelnchin, I am experiencing similar issues and have been unable to get the graph widget to work after multiple installation attempts. Regarding your list above:

  1. Apple silicon
  2. 3.9.18
  3. JupyterLab v3.6.6
  4. Yes, I removed all python packages and followed the graph-notebook install instructions for jupyterlab for this repo.
  5. I tried some things but not of them work. They have since been deleted.
  6. Yes.
  7. No.

What do you recommend?

twiechert-exiger avatar Oct 26 '23 00:10 twiechert-exiger

Getting the following now in my browser console:

Could not instantiate widget

and

Error: Module graph_notebook_widgets, semver range 3.9.0 is not registered as a widget module

This is with the current setup:

!jupyter labextension list

JupyterLab v3.6.6
Other labextensions (built into JupyterLab)
   app dir: ~/homebrew/Cellar/[email protected]/3.9.18/Frameworks/Python.framework/Versions/3.9/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v3.1.7 enabled OK
        jupyter-leaflet v0.17.3 enabled OK

twiechert-exiger avatar Oct 26 '23 12:10 twiechert-exiger

Hi @twiechert-exiger , thank you for the additional data point.

I've recently seen a few other similar reports of the graph_notebook_widgets notebook/lab extension failing to install only on M1/M2 Macs, so this seems to be a platform-specific issue (though I'm not 100% sure as I don't have an ARM Mac to test).

At the moment, our binary distributions on PyPi are built only for x86_64, so I would consider graph-notebook unsupported on ARM64 for now. We'll look into providing separate binaries for multi-platform support in the future, along with multi-platform images as mentioned here: https://github.com/aws/graph-notebook/issues/509.

michaelnchin avatar Oct 27 '23 02:10 michaelnchin