ipympl
ipympl copied to clipboard
Toolbar icons disappeared
Hello everyone, I'm sorry to ask this as I thought this was already an issue a few weeks ago. But I looked through all the issues and couldn't find it. So maybe I was wrong or I was not searching properly. Sorry for the inconvenience.
Describe the issue
The toolbar icons have disappeared. This happened already a while ago after I reinstalled ipympl. So I thought it was just a bug in the version I updated to. But I updated ipympl and jupyter-matplotlib yesterday and still have no icons. Do you have any idea what I did wrong? The icons are the same as in the ipywidgets set, isn't it?
I have attached a screenshot at the bottom. All the buttons work just fine (also the tooltips), so it's just about the GUI.
Thanks for you help!
Versions
Output of
python -c "import sys; print('\n',sys.version); import ipympl; print('ipympl version:', ipympl.__version__)" ; jupyter --version ; jupyter nbextension list ; jupyter labextension list
3.6.10 (default, Mar 5 2020, 10:17:47) [MSC v.1900 64 bit (AMD64)]
ipympl version: 0.5.8
jupyter core : 4.6.3
jupyter-notebook : 6.1.4
qtconsole : not installed
ipython : 7.16.1
ipykernel : 5.3.4
jupyter client : 6.1.7
jupyter lab : 2.2.2
nbconvert : 6.0.7
ipywidgets : 7.5.1
nbformat : 5.0.7
traitlets : 4.3.3
Known nbextensions:
config dir: C:\Users\maxke\.jupyter\nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: ok
nbextensions_configurator/config_menu/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/config_menu/main
contrib_nbextensions_help_item/main enabled
- Validating: ok
codefolding/main enabled
- Validating: ok
python-markdown/main enabled
- Validating: ok
hinterland/hinterland enabled
- Validating: ok
hide_input/main enabled
- Validating: ok
snippets/main enabled
- Validating: ok
code_prettify/2to3 disabled
tree section
nbextensions_configurator/tree_tab/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/tree_tab/main
edit section
codefolding/edit enabled
- Validating: ok
config dir: C:\Users\maxke\.conda\envs\jlab\etc\jupyter\nbconfig
notebook section
jupyter-matplotlib/extension enabled
- Validating: ok
nbdime/index disabled
jupyter-js-widgets/extension enabled
- Validating: ok
JupyterLab v2.2.2
Known labextensions:
app dir: C:\Users\maxke\.conda\envs\jlab\share\jupyter\lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled ok
@jupyterlab/debugger v0.2.0 enabled ok
@jupyterlab/toc v4.0.0 enabled ok
@krassowski/jupyterlab_go_to_definition v1.0.0 enabled ok
@lckr/jupyterlab_variableinspector v0.5.1 enabled ok
jupyter-matplotlib v0.7.4 enabled ok
nbdime-jupyterlab v2.0.0 enabled ok
spreadsheet-editor v0.4.0 enabled ok
Reproduce
plt.figure()
plt.plot(np.linspace(0,1, 100), np.random.rand(100))

This looks the same as https://github.com/matplotlib/ipympl/issues/238 so I would've thought this would be fixed :thinking: .
Are you working offline? If so maybe it's related to https://github.com/jupyter-widgets/ipywidgets/issues/2997
Thank you very much, this is the issue I meant. But I still couldn't fix it. So, first, I cleaned up my configurations, it was a little bit cluttered. But more important, I tried to look into the CSS changes in #245. They are all set. When I inspect the DOM elements the CSS settings are as expected. Also the icon style contains the "fa-fw" tag as supposed by the javascript changes.
How can I check the version of @jupyter-widgets/base as mentioned in #246 ? It's not clear to me where to look for it?
Oh, I forgot to menion, I'm not working offline.
After browsing through other issues, docs and browser output, can my problem be related to jupyter-widgets/ipywidgets#2989? I also get this message on the javascript console.
vendors~main.4da238e0c0b51cf48011.js:2 Error: widget model not found
at x.get_model (vendors~main.4da238e0c0b51cf48011.js:2)
at h.renderModel (vendors~main.4da238e0c0b51cf48011.js:2)
renderModel @ vendors~main.4da238e0c0b51cf48011.js:2
I also looked into these code sections. But I can't identify anything related to Font-Awesome.
Ok, it's clearly a wrong font-family setting to font-awesome. After changing the css style in the browser developer tools as shown in jupyter-widgets/ipywidgets#3000, the icons are back. But it's only a temporary fix as long as I keep jupyterlab instance open.
I've been working on a similar issue in another repo. Setting the font-family to "FontAwesome, Font Awesome 5 Free" seems to fix it, it will pick the right font in Jupyter Notebook (FA4) and JupyterLab (FA5). Let's keep this issue open until fixed :)
It is odd I cannot reproduce the issue you see on ipympl though. But I could reproduce it on another project.
Sorry for closing. Yes, I also found it strange that it worked after I set up a new environment, but with identical packages. Maybe I have to look if there is a difference in the packages although it is supposed to be identical.
Interesting: I looked at a notebook in jupyterlab launched from conda env 2. The icons were there. When I changed the kernel to the conda env 1 the icons were still there after rerunning the whole notebook. Then I launched jupyterlab from conda env 1 and the icon disappeared.