janfreyberg / ipyannotations

Data annotations in python using jupyter notebooks
https://ipyannotations.readthedocs.io/
MIT License
53 stars 7 forks source link

TextTagger - Javascript Error #33

Open PawaritL opened 1 year ago

PawaritL commented 1 year ago

the TextTagger object seems to constantly generate a Javascript error in JupyterLab (I'm using 3.4.8) with the latest versions of ipywidgets (8.0.2) installed. I keep getting "Class null not found in module @jupyter-widgets/controls" (see second screenshot of Chrome developer console). Any ideas on what might be causing this? Normal text classification works fine. Many thanks!

image image
janfreyberg commented 1 year ago

Hi there, is this with the latest version of ipyannotations?

I haven't seen this before but the developer console output looks like there is a conflict between different dependencies. I'll take a look. Does the widget still work?

PawaritL commented 1 year ago

Many thanks for creating this amazing library btw!

This is with: ipyannotations==0.5.1 ipywidgets==8.0.2 jupyterlab==3.4.8 jupyterlab-widgets==3.0.3

The widget works for JupyterLab - tested with superintendent just now (see screenshot attached). It's just that this big javascript error block keeps popping up with every cell.

Screenshot 2022-10-18 at 10 43 08

Thanks so much for your help!

PawaritL commented 1 year ago

FYI - for classic Jupyter notebook (not Jupyter Lab) the widget doesn't work at all, this is what happens:

image image
jasongrout-db commented 1 year ago

I see you are using ipywidgets 8. Does it work with ipywidgets 7?

PawaritL commented 1 year ago

I see you are using ipywidgets 8. Does it work with ipywidgets 7?

I tried just now with ipywidgets 7.6 and 7.7:

janfreyberg commented 1 year ago

Hi, and apologies for not getting back on this - I was on holiday.

I can reproduce your error in JupyterLab - I see the same large box with javascript errors. However, it does resolve for me when using ipywidgets 7.7.2 - jupyterlab no longer displays the error.

I can also reproduce the error in Jupyter Notebook - I find it a bit hard to understand the issue as the error refers to mime-type mismatches referring to base jupyter widgets, but when loading ipywidgets by itself it works and there is no error. I think this may be something to raise with the core jupyter widget devs. @jasongrout-db - do you have a suggestion for how to fix this or where to raise an issue?

For @PawaritL - if you install ipywidgets 7.7.2 does this also solve the issue for you? If so I may release a new version with the ipywidget version pinned.

Thanks again for raising this!