question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No plots after upgrading to jupyterlab 1.0.3

See original GitHub issue
  • Installed packages:
(devel) pointyhaired@gtrojan> conda list ipympl
# packages in environment at /home/george.trojan/miniconda3/envs/devel:
#
# Name                    Version                   Build  Channel
ipympl                    0.3.3                      py_0    conda-forge
(devel) pointyhaired@gtrojan> conda list jupyter
# packages in environment at /home/george.trojan/miniconda3/envs/devel:
#
# Name                    Version                   Build  Channel
jupyter                   1.0.0                      py_2    conda-forge
jupyter_client            5.3.1                      py_0    conda-forge
jupyter_console           6.0.0                      py_0    conda-forge
jupyter_core              4.4.0                      py_0    conda-forge
jupyterlab                1.0.3                    py37_0    conda-forge
jupyterlab_server         1.0.0                      py_1    conda-forge
(devel) pointyhaired@gtrojan> conda list ipython
# packages in environment at /home/george.trojan/miniconda3/envs/devel:
#
# Name                    Version                   Build  Channel
ipython                   7.6.1            py37h5ca1d4c_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge

(devel) pointyhaired@gtrojan> jupyter labextension list
JupyterLab v1.0.3
Known labextensions:
   app dir: /home/george.trojan/miniconda3/envs/devel/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v1.0.1  enabled  OK
        @pyviz/jupyterlab_pyviz v0.8.0  enabled  OK
        jupyter-matplotlib v0.4.2  enabled  OK
        jupyterlab-drawio v0.6.0  enabled  OK
        jupyterlab_bokeh v1.0.0  enabled  OK
        jupyterlab_vim v0.11.0  enabled  OK
  • Code:
%matplotlib widget
import matplotlib.pyplot as plt
fig = plt.figure(figsize=(8, 8))
ax = fig.add_subplot(1, 1, 1)
_ = ax.plot([0, 1], [0, 1], '-')
plt.show()
  • Behaviour:

    • First run: Nothing appears in the browser (Firefox), log warnings:
[I 19:22:55.878 LabApp] Kernel restarted: cac8af90-19f9-46f3-b711-5dc73e000f4a
[IPKernelApp] WARNING | No such comm: d0d520499eb94506808d830dd0cdc294
[IPKernelApp] WARNING | No such comm: 80813842daba4f89a97d734ec5a9abc6
[IPKernelApp] WARNING | No such comm: d0d520499eb94506808d830dd0cdc294
[IPKernelApp] WARNING | No such comm: 685a0cc2c96941c784b15b72d3ded931
[IPKernelApp] WARNING | No such comm: c35f6dd5095f47639f7635fd9d59b77c
[IPKernelApp] WARNING | No such comm: d0d520499eb94506808d830dd0cdc294
[IPKernelApp] WARNING | No such comm: d0d520499eb94506808d830dd0cdc294
[IPKernelApp] WARNING | No such comm: d0d520499eb94506808d830dd0cdc294
[IPKernelApp] WARNING | No such comm: d0d520499eb94506808d830dd0cdc294
[IPKernelApp] WARNING | No such comm: d0d520499eb94506808d830dd0cdc294
  • Second run (without kernel restart): Control buttons (Toggle interaction etc…) displayed on the left, plot not shown. The log shows similar lines, with different codes.
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
[IPKernelApp] WARNING | No such comm: b9cf5e11dc9748d4b690c69374fb8f1f
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
[IPKernelApp] WARNING | No such comm: 61f984b852ea48d5b96153ca4799ad5d
[IPKernelApp] WARNING | No such comm: b01ce5d026b64cf0998b47413e9677a5
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555
  • Third run (without kernel restart): The log shows several identical lines
[IPKernelApp] WARNING | No such comm: e0fda28094cf418e84b5cf36b9a1f555

Traceback in the browser (buttons are not displayed):

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-3-e16fb2894584> in <module>
----> 1 get_ipython().run_line_magic('matplotlib', 'widget')
      2 import matplotlib.pyplot as plt
      3 fig = plt.figure(figsize=(8, 8))
      4 ax = fig.add_subplot(1, 1, 1)
      5 _ = ax.plot([0, 1], [0, 1], '-')

~/miniconda3/envs/devel/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_line_magic(self, magic_name, line, _stack_depth)
   2311                 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
   2312             with self.builtin_trap:
-> 2313                 result = fn(*args, **kwargs)
   2314             return result
   2315 

</home/george.trojan/miniconda3/envs/devel/lib/python3.7/site-packages/decorator.py:decorator-gen-108> in matplotlib(self, line)

~/miniconda3/envs/devel/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
    185     # but it's overkill for just that one bit of state.
    186     def magic_deco(arg):
--> 187         call = lambda f, *a, **k: f(*a, **k)
    188 
    189         if callable(arg):

~/miniconda3/envs/devel/lib/python3.7/site-packages/IPython/core/magics/pylab.py in matplotlib(self, line)
     97             print("Available matplotlib backends: %s" % backends_list)
     98         else:
---> 99             gui, backend = self.shell.enable_matplotlib(args.gui.lower())
    100             self._show_matplotlib_backend(args.gui, backend)
    101 

~/miniconda3/envs/devel/lib/python3.7/site-packages/IPython/core/interactiveshell.py in enable_matplotlib(self, gui)
   3411                 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
   3412 
-> 3413         pt.activate_matplotlib(backend)
   3414         pt.configure_inline_support(self, backend)
   3415 

~/miniconda3/envs/devel/lib/python3.7/site-packages/IPython/core/pylabtools.py in activate_matplotlib(backend)
    312 
    313     import matplotlib.pyplot
--> 314     matplotlib.pyplot.switch_backend(backend)
    315 
    316     # This must be imported last in the matplotlib series, after

~/miniconda3/envs/devel/lib/python3.7/site-packages/matplotlib/pyplot.py in switch_backend(newbackend)
    193         The name of the backend to use.
    194     """
--> 195     close("all")
    196 
    197     if newbackend is rcsetup._auto_backend_sentinel:

~/miniconda3/envs/devel/lib/python3.7/site-packages/matplotlib/pyplot.py in close(fig)
    675             _pylab_helpers.Gcf.destroy(figManager.num)
    676     elif fig == 'all':
--> 677         _pylab_helpers.Gcf.destroy_all()
    678     elif isinstance(fig, int):
    679         _pylab_helpers.Gcf.destroy(fig)

~/miniconda3/envs/devel/lib/python3.7/site-packages/matplotlib/_pylab_helpers.py in destroy_all(cls)
     71         for manager in list(cls.figs.values()):
     72             manager.canvas.mpl_disconnect(manager._cidgcf)
---> 73             manager.destroy()
     74 
     75         cls._activeQue = []

~/miniconda3/envs/devel/lib/python3.7/site-packages/ipympl/backend_nbagg.py in destroy(self)
    211 
    212     def destroy(self):
--> 213         self.canvas.close()
    214 
    215 

~/miniconda3/envs/devel/lib/python3.7/site-packages/ipywidgets/widgets/widget.py in close(self)
    465         if self.comm is not None:
    466             Widget.widgets.pop(self.model_id, None)
--> 467             self.comm.close()
    468             self.comm = None
    469             self._ipython_display_ = None

~/miniconda3/envs/devel/lib/python3.7/site-packages/ipykernel/comm/comm.py in close(self, data, metadata, buffers)
    114             data=data, metadata=metadata, buffers=buffers,
    115         )
--> 116         self.kernel.comm_manager.unregister_comm(self)
    117 
    118     def send(self, data=None, metadata=None, buffers=None):

~/miniconda3/envs/devel/lib/python3.7/site-packages/ipykernel/comm/manager.py in unregister_comm(self, comm)
     54         """Unregister a comm, and close its counterpart"""
     55         # unlike get_comm, this should raise a KeyError
---> 56         comm = self.comms.pop(comm.comm_id)
     57 
     58     def get_comm(self, comm_id):

KeyError: 'e0fda28094cf418e84b5cf36b9a1f555'

This happened on two computers updated with conda yesterday and today.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yoichi-kazamacommented, Aug 16, 2019

Hi @thomasaarholt thank you for the information. I uninstalled/reinstalled conda and setup Jupyterlab 1.0.5, matplotlib 3.1.1 and ipympl 0.3.3 via conda-forge, and it’s working. Thanks!

1reaction
yt87commented, Jul 29, 2019

No luck. I reinstalled jupyter-matplotlib and @jupyter-widgets/jupyterlab-manager. Current versions are:

$ jupyter labextension list
JupyterLab v1.0.2
Known labextensions:
   app dir: /home/gtrojan/miniconda3/envs/numeric/share/jupyter/lab
        @jupyter-widgets/jupyterlab-manager v1.0.2  enabled  OK
        jupyter-matplotlib v0.4.2  enabled  OK
        jupyterlab_vim v0.11.0  enabled  OK

Same thing happens with jupyterlab 1.0.2 and chromium browser. BTW,

$ conda list nodejs
# packages in environment at /home/gtrojan/miniconda3/envs/numeric:
#
# Name                    Version                   Build  Channel
nodejs                    11.14.0              he1b5a44_1    conda-forge
Read more comments on GitHub >

github_iconTop Results From Across the Web

No plots after upgrading to jupyterlab 1.0.3 · Issue #131 - GitHub
Second run (without kernel restart): Control buttons (Toggle interaction etc...) displayed on the left, plot not shown. The log shows similar ...
Read more >
Plotly express is not rendered in jupyter lab - Stack Overflow
Conda was not available on the container and when installing node and npm via the jupyterlab terminal (through pip or apt-get) I got...
Read more >
tiledb-plot-widget - PyPI
The jlpm command is JupyterLab's pinned version of yarn that is installed with JupyterLab. You may use yarn or npm in lieu of...
Read more >
Jupyter Notebook - kepler.gl
When use it in Jupyter lab, keplergl is only supported in JupyterLab > 1.0 and Python 3. Run jupyter labextension install keplergl- ...
Read more >
Working in the Notebook — Bokeh 1.3.0 documentation
No other modifications are required. When show() is called, the plot will be displayed inline in the next notebook output cell. You can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found