Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In recent versions of JupyterLab and Jupyter Notebooks, charts do not appear (empty cell) #2314

Closed
cdolek opened this issue Apr 10, 2024 · 3 comments

Comments

@cdolek
Copy link

cdolek commented Apr 10, 2024

The following code tried with both jupyter lab and jupyter notebooks produces empty looking cell using the new version of jupyter lab and notebooks. I tested the same in an older environment I have, and it works. More information below.

from pyecharts.charts import Line, Bar
    
bar = Bar()
bar.add_xaxis(["shirts", "cardigans", "chiffons", "trousers", "heels", "socks"])
bar.add_yaxis("Merchant A", [5, 20, 36, 10, 75, 90])
bar.render_notebook()

Recent environment that does NOT work (tested both lab and notebook):

➜ jupyter --version
Selected Jupyter core packages...
IPython          : 8.22.2
ipykernel        : 6.29.3
ipywidgets       : 8.1.2
jupyter_client   : 8.6.1
jupyter_core     : 5.7.2
jupyter_server   : 2.13.0
jupyterlab       : 4.1.6
nbclient         : 0.10.0
nbconvert        : 7.16.3
nbformat         : 5.10.4
notebook         : 7.1.2
qtconsole        : 5.5.1
traitlets        : 5.14.2

Python 3.11.0
JupyterLab version: 4.1.6
Jupyter Notebook version: 7.1.2

Screenshot 2024-04-10 at 11 06 46 AM
Screenshot 2024-04-10 at 11 07 30 AM

Older Environment that WORKS (tested notebook):

➜ jupyter --version
Selected Jupyter core packages...
IPython          : 8.14.0
ipykernel        : 6.23.1
ipywidgets       : 8.0.6
jupyter_client   : 8.2.0
jupyter_core     : 5.3.1
jupyter_server   : 2.6.0
jupyterlab       : not installed
nbclient         : 0.8.0
nbconvert        : 7.5.0
nbformat         : 5.9.0
notebook         : 6.5.4
qtconsole        : not installed
traitlets        : 5.9.0

Python 3.9.16

Another older Environment that does NOT work (only tested jupyter lab):

➜ python --version
Python 3.9.16

➜ jupyter --version
Selected Jupyter core packages...
IPython          : 8.15.0
ipykernel        : 6.25.2
ipywidgets       : 8.0.7
jupyter_client   : 8.3.1
jupyter_core     : 5.3.1
jupyter_server   : 2.7.3
jupyterlab       : 4.0.11
nbclient         : 0.8.0
nbconvert        : 7.8.0
nbformat         : 5.9.2
notebook         : not installed
qtconsole        : 5.4.3
traitlets        : 5.9.0
@cdolek cdolek changed the title In recent versions of JupyterLab and Jupyter Notebooks, charts do not appear. In recent versions of JupyterLab and Jupyter Notebooks, charts do not appear (empty cell) Apr 10, 2024
@sunhailin-Leo
Copy link
Member

@cdolek

  • Check your browser console and find any error notification, thx~

@cdolek
Copy link
Author

cdolek commented Apr 12, 2024

@sunhailin-Leo These errors (same, twice) show up in console when the cell is executed.

VM540:2 Uncaught ReferenceError: require is not defined
    at <anonymous>:2:5
    at P.attachWidget (jlab_core.4f5a04974a…ab2b69643:1:1791178)
    at P.insertWidget (jlab_core.4f5a04974a…ab2b69643:1:1790642)
    at E._insertOutput (jlab_core.4f5a04974a…ab2b69643:1:1230810)
    at E.onModelChanged (jlab_core.4f5a04974a…ab2b69643:1:1227295)
    at m (jlab_core.4f5a04974a…ab2b69643:1:1763822)
    at Object.l [as emit] (jlab_core.4f5a04974a…ab2b69643:1:1763498)
    at a.emit (jlab_core.4f5a04974a…ab2b69643:1:1761335)
    at d._onListChanged (jlab_core.4f5a04974a…ab2b69643:1:1223034)
    at m (jlab_core.4f5a04974a…ab2b69643:1:1763822)
VM541:2 Uncaught ReferenceError: require is not defined
    at <anonymous>:2:9
    at P.attachWidget (jlab_core.4f5a04974a…ab2b69643:1:1791178)
    at P.insertWidget (jlab_core.4f5a04974a…ab2b69643:1:1790642)
    at E._insertOutput (jlab_core.4f5a04974a…ab2b69643:1:1230810)
    at E.onModelChanged (jlab_core.4f5a04974a…ab2b69643:1:1227295)
    at m (jlab_core.4f5a04974a…ab2b69643:1:1763822)
    at Object.l [as emit] (jlab_core.4f5a04974a…ab2b69643:1:1763498)
    at a.emit (jlab_core.4f5a04974a…ab2b69643:1:1761335)
    at d._onListChanged (jlab_core.4f5a04974a…ab2b69643:1:1223034)
    at m (jlab_core.4f5a04974a…ab2b69643:1:1763822)

Python 3.11.0 and Jupyter Lab

➜ jupyter --version
Selected Jupyter core packages...
IPython          : 8.22.2
ipykernel        : 6.29.3
ipywidgets       : 8.1.2
jupyter_client   : 8.6.1
jupyter_core     : 5.7.2
jupyter_server   : 2.13.0
jupyterlab       : 4.1.4
nbclient         : 0.10.0
nbconvert        : 7.16.2
nbformat         : 5.10.2
notebook         : not installed
qtconsole        : not installed
traitlets        : 5.14.2

@sunhailin-Leo
Copy link
Member

@cdolek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants