I’m using nbconvert to convert from .ipynb to .html, but I’m getting no JSROOT output. The reason seems that my website is trying to find JSROOT scripts from a local directory rather than from the ROOT domain:
Notebook using JSROOT from static location, provided from ROOT installation.
If you want to publish HTML files, you have to replace static location by some public URL - it can be https://root.cern.ch/js/notebook/ (as on SWAN) or any particular release like https://root.cern.ch/js/5.8.0/. In ideal case you need to copy JSROOT from ROOT installation to your web server and use it - this guarantee compatibility between generated JSON data and JSROOT scripts.
Ah okay, I think copying JSROOT to my web server would be indeed the more ideal case. Would I just have to copy the root/js/scripts/ folder to my website’s /static folder?
Even after adding the contents of $ROOTSYS/js to the /static folder of my web server, I still get no visualization output: https://biodynamo.org/notebooks/cell_division.html. Is there another missing step?
A difference between my use case and the SWAN gallery examples is that I don’t use nbviewer to host the notebooks, but rather I store the html files directly on our server. The console output of the abovementioned website complains about “requirejs” missing.
The missing custom.css should not be the issue; I am also getting that when I open the notebook locally (and the JSROOT visualization works). Do you have any more suggestions on what I can try here?
For those that need to apply this patch in a bash script, this is the sed command I’m using to do so:
if [ $($ROOTSYS/bin/root-config --version) == "6.22/00" ]; then
sed -i -e 's/JSROOT.gStyle, style/JSROOT.gStyle, obj/g' ${ROOTSYS}/js/scripts/JSRootPainter.v6.js
fi