aws / graph-notebook

Library extending Jupyter notebooks to integrate with Apache TinkerPop, openCypher, and RDF SPARQL.
https://github.com/aws/graph-notebook
Apache License 2.0
728 stars 166 forks source link

[BUG] Visualizations fail to work in Jupyter labs #529

Open ahutter opened 1 year ago

ahutter commented 1 year ago

Community Note

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

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.

michaelnchin commented 1 year ago

Hi @ahutter , thanks for submitting a bug report!

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

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?
twiechert-exiger commented 11 months ago

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 commented 11 months ago

Getting the following now in my browser console:

Could not instantiate widget

and

_Error: Module graph_notebookwidgets, 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/python@3.9/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
michaelnchin commented 11 months ago

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.