Closed lastephey closed 1 year ago
I can replicate this same issue on my personal desktop (in Windows through WSL). My first thought is that this could be due to some type of settings. Some default behaviors in JupyterLab are different from Jupyter Notebook. I'm looking at that right now.
I also seem to recall reading somewhere that there's some weird incompatibilities between JupyterLab and some IPython behavior (which RoundTrip seems to rely heavily on). I can't seem to find it again, though, so I might be remembering wrong.
Hm... From the Chrome Developer Tools, I'm seeing a lot of TypeErrors being raised from something called "jlab_core" (likely JupyterLab) when the loadVisualization
cell is run. That's not what I expected. I'm looking at this to see if it could help.
I believe I've found the problem. It comes from the first few lines of roundtripTree.js
:
(function (element) {
require(['https://d3js.org/d3.v4.min.js'], function (d3) {
var cleanTree = argList[0].replace(/'/g, '"');
var forestData = JSON.parse(cleanTree);
The issue here comes down to the use of requirejs. From this thread on the Jupyter Discourse Form, Jupyter Notebook makes requirejs available on the page, but JupyterLab doesn't. It looks like the recommended way to resolve this on JupyterLab is to make a JupyterLab extension, but I don't know if that's how we'd want to go about this.
Dear Hatchet developers,
We discovered in Issue #360 that the roundtrip-based interactive visualizations work in classic/legacy Jupyter notebook but do not currently work in Jupyer-lab. I observed this same behavior on my laptop and also at NERSC.
In classic Jupyter, this cell produces the expected output:
But in Jupyter-lab, the same cell executes but nothing is displayed.
I would appreciate it if you could add support for interactive Hatchet visualizations Jupyter-lab (the default at NERSC).
If you need additional information please let me know.
Thank you very much, Laurie