jupyter-widgets / ipydatagrid

Fast Datagrid widget for the Jupyter Notebook and JupyterLab
BSD 3-Clause "New" or "Revised" License
579 stars 51 forks source link

ipydatagrid not displaying - Error displaying widget: model not found #278

Closed JohnOmernik closed 3 years ago

JohnOmernik commented 3 years ago

Cannot Display a ipydatagrid, instead get

Error displaying widget: model not found

To Reproduce Steps to reproduce the behavior: Create a dataframe Try to display it.

from ipydatagrid import DataGrid, TextRenderer, Expr
DataGrid(df, base_row_size=30, base_column_size=150, renderers=renderers)

Error in JS Console: Error: Module ipydatagrid, semver range ^1.1.6 is not registered as a widget module

Expected behavior Display Data grid

Environment (please complete the following information):

# jupyter labextension list
JupyterLab v3.2.1
/usr/local/share/jupyter/labextensions
        ipysheet v0.5.0 enabled OK (python, ipysheet)
        jupyterlab-plotly v5.3.1 enabled OK
        ipydatagrid v1.1.6 enabled OK
        bqplot v0.5.32 enabled OK (python, bqplot)
        qgrid2 v1.1.3 enabled OK (python, qgrid2)
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)
ibdafna commented 3 years ago

Hi @JohnOmernik 👋

I am unable to reproduce your issue. Are you working in a fresh environment? Can you type out the commands and steps you took to get everything installed?

meako689 commented 3 years ago

Hey, I'm having the same issue.

Apple silicon, fresh install (conda)

Selected Jupyter core packages...
IPython          : 7.28.0
ipykernel        : 6.4.2
ipywidgets       : 7.6.5
jupyter_client   : 7.0.6
jupyter_core     : 4.9.1
jupyter_server   : 1.11.1
jupyterlab       : 3.2.1
nbclient         : 0.5.4
nbconvert        : 6.2.0
nbformat         : 5.1.3
notebook         : 6.4.5
qtconsole        : not installed
traitlets        : 5.1.1

ipydatagrid installed by:

➜  ~ conda install -c conda-forge ipydatagrid

other extensions

➜  ~ jupyter labextension list
JupyterLab v3.2.1
/opt/homebrew/Caskroom/miniforge/base/share/jupyter/labextensions
        ipydatagrid v1.1.6 enabled OK
        bqplot v0.5.32 enabled OK (python, bqplot)
        @jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)

Other labextensions (built into JupyterLab)
   app dir: /opt/homebrew/Caskroom/miniforge/base/share/jupyter/lab
        @arbennett/base16-gruvbox-dark v0.1.5 enabled OK
        @axlair/jupyterlab_vim v0.13.4 enabled OK
        jupyterlab-theme-solarized-dark v2.0.1 enabled OK

➜  ~

browsrer console output image

ibdafna commented 3 years ago

Looking at your output, you have an non-clean environment which is mixing JLab<=2 extensions with JLab>=3 ones. This is not necessarily a big issue, but it makes things very difficult to debug. Please try with a fresh environment. Would you please try the following commands and let me know the results:

conda create -n temp -c conda-forge python=3.8 ipydatagrid jupyterlab
conda activate temp

Then run jupyter lab as usual and try ipydatagrid. It should work (just tested again on my machine), but if not please please post any information here. If it works, post that too 😄

meako689 commented 3 years ago

After creating temp 3.8 environment, ipydatagrid worked fine for me. After that I've tried installing extensions one by one, none seemed to break it. Furthermore, when I've switched to my original environment, issue did not reproduce as well.

¯_(ツ)_/¯

ibdafna commented 3 years ago

Closing this for now, but feel free to reopen if something else comes up!