vitessce-python
vitessce-python copied to clipboard
Nbconvert output of html/javascript in output does not render in 6.5 (works still in 6.4) #1844
Describe the bug So this was noticed on RStudioConnect on O2. For some reason only vitessce seems affected but html widgets do not render after conversion with nbconvert (which is how RSC displays jupyter notebooks on the platform). Plotly and ipywidgets seem to work. There are potential issues with Nbconvert but we're running 6.4.4 on RSC, not sure what has changed. Need help diagnosing what is going on in JS. To Reproduce Save an ipynb of a vitessce widget
for example config_vc_merfish.ipynb:
from vitessce import VitessceConfig, VitessceChainableConfig, VitessceConfigDatasetFile
import requests, json
#from example_configs import dries as dries_config
#from other_configs import merfish as merfish_config
url = "https://sealver.in/vitessce/merfish/config.json"
response = requests.request("GET", url)
merfish_config = response.json()
vc = VitessceConfig.from_dict(merfish_config)
imports, code = vc.to_python()
reconstructed_vc = eval(code)
reconstructed_vc.widget(theme="light")
Then convert to html with execution on.
jupyter nbconvert --to html --execute config_vc_merfish.ipynb
This will result in a mostly empty notebook with the following js console output
Expected behavior We used to be be able to use jupyter notebooks to display Vitesse widgets. If the notebook is set to execute, then on the html page, the widget should run and display config contents.
More details from the chrome console:
DevTools failed to load source map: Could not load content for https://cdn.jsdelivr.net/npm/vitessce-jupyter@%5E0.1.14/dist/index.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
this one is a bit odd because the file at that link is called index.js and not index.js.map
maybe filenames changed as part of a new release of vitesse-jupyter?
this works: https://cdn.jsdelivr.net/npm/vitessce-jupyter@%5E0.1.14/dist/index.js but this one is what the widget calls for : https://cdn.jsdelivr.net/npm/vitessce-jupyter@%5E0.1.14/dist/index.js.map
To see an online version: https://ccb.connect.hms.harvard.edu/merfish1/ for whatever reason it cannot find https://ccb.connect.hms.harvard.edu/merfish1/vFLOv47fN/vitessce-jupyter.js
Possibly related to https://github.com/jupyter/nbconvert/issues/1900