1615070 : Problem with Jupyter notebook

Created: 2026-07-07T08:08:57Z - current status: open

Anonymized Summary:

A user reports an issue with Jupyter Notebook on [REDACTED] when using matplotlib magic commands (%matplotlib widget or %matplotlib ipympl). Plotting fails with the JavaScript error: "Failed to load model class 'MPLCanvasModel' from 'jupyter-matplotlib'". The issue occurs specifically in one of the XFEL environments.


Summary:

Inability to render plots interactively due to a frontend JavaScript error related to the ipympl backend in a JupyterHub environment.

---

Possible Solution/Next Steps:

  1. Verify Backend Installation: Ensure ipympl is installed in the affected environment: bash pip install --upgrade ipympl or (if using conda): bash conda install -c conda-forge ipympl

  2. Check JupyterLab Extensions: For JupyterLab users, confirm the @jupyter-widgets/jupyterlab-manager extension is enabled: bash jupyter labextension list Install if missing: bash jupyter labextension install @jupyter-widgets/jupyterlab-manager

  3. Environment-Specific Fixes:

  4. Restart the kernel after installing/upgrading packages.
  5. Try switching to a different matplotlib backend temporarily (e.g., %matplotlib inline) to isolate the issue.

  6. Contact Support: If unresolved, reach out to the JupyterHub administrators ([REDACTED]) or the XFEL computing support team, specifying:

  7. Environment name (e.g., [xfel-environment]).
  8. Exact error message and steps to reproduce.

Sources: None (based on general troubleshooting for ipympl errors).