ipytree icon indicating copy to clipboard operation
ipytree copied to clipboard

Error displaying ipytree widget on EMR 6.8.0 Notebook

Open grzegorz8 opened this issue 3 years ago • 0 comments

I'm trying to run a simple example of Tree on JupyterLab.

from ipytree import Node, Tree
t = Tree()
t.add_node(Node("test"))
t

But all I get is Error displaying widget: model not found error. In addition, browser console reports the following errors:

Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm was closed too early
Uncaught (in promise) Error: Invalid response: 500 Internal Server Error
Could not instantiate widget
Error: Could not create a model.
Exception opening new comm
Error: Module ipytree, semver range ^0.2 is not registered as a widget module

browser_console_001

Environment: I'm running Jupyter Notebook on EMR 6.8.0. I installed ipytree==0.2.2 as recommended in AWS docs.

/emr/notebook-env/bin/python3 -m pip install ipytree

Some info about versions below.

# python --version
Python 3.7.10

# pip --version
pip 20.2.2 from /usr/lib/python3.7/site-packages/pip (python 3.7)

# /emr/notebook-env/bin/jupyter labextension list
JupyterLab v3.4.8
/emr/notebook-env/share/jupyter/labextensions
        jupyterlab-plotly v5.9.0 enabled OK
        ipytree v0.2.2 enabled OK
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        @jupyter-widgets/jupyterlab-manager v3.0.0 enabled OK (python, jupyterlab_widgets)

# /emr/notebook-env/bin/jupyter nbextension list
Known nbextensions:
  config dir: /emr/notebook-env/etc/jupyter/nbconfig
    notebook section
      ipytree/extension  enabled 
      - Validating: OK
      jupyterlab-plotly/extension  enabled 
      - Validating: OK
      jupyter-js-widgets/extension  enabled 
      - Validating: OK

# /emr/notebook-env/bin/jupyter serverextension list
config dir: /root/.jupyter
    sparkmagic  enabled 
    - Validating...
      sparkmagic 0.19.1 OK

Thanks in advance for any suggestions how to fix the issue.

grzegorz8 avatar Oct 19 '22 11:10 grzegorz8