holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.71k stars 404 forks source link

archive.auto doesn't work with JupyterLab #3570

Open sappjw opened 5 years ago

sappjw commented 5 years ago

It seems that hv.archive.auto() doesn't work with JupyterLab because it doesn't allow Javascript execution:

    >>> hv.archive.auto()

    Javascript Error: IPython is not defined
    Automatic capture is now enabled. [2019-03-21 11:03:54]
    ...
    >>> hv.archive.export()

    Export name: '2019_03_21-11_03_54'
    Directory    '<snip>'

    If no output appears, please check holoviews.archive.last_export_status()
    Javascript Error: IPython is not defined

    >>> hv.archive.last_export_status()

    Status of the last call to holoviews.archive.export is unknown.
    (Re-execute this method once kernel status is idle.)

Is there a way to work around this limitation for JupyterLab notebooks?

jlstevens commented 5 years ago

Thanks for reporting this!

Frankly, I am not surprised - the only way this ever worked in classic notebook was with some dubious JavaScript and as you point out JupyterLab doesn't allow JavaScript execution.

I would love to be able to fix this if I thought the fix were easy, but I suspect the effort required doesn't really justifiy it. Maybe the docs can mention this only works in classic notebook or maybe there is some easier way to make it work that I don't know about... @philippjfr any ideas?

jlstevens commented 5 years ago

Thinking about this more, it is likely that the only part that is tricky in jupyterlab is grabbing the notebook JSON state - not the export of the images etc. As a result, I can probably issue a warning when things fail which means it can work properly in classic notebook and it can mostly work in Jupyterlab.

gioarma commented 4 years ago

I have encountered this problem as well, is there any news about this? I think it's quite a shame that such an important feature does not work in JupyterLab, especially since I guess more and more people are switching from Jupyter notebooks to JupyterLab.

philippjfr commented 4 years ago

No, sadly not, in fact we are likely to remove this functionality for this reason.

jbednar commented 4 years ago

It would be great for this to work in JupyterLab; I'm betting on @jlstevens figuring out a way. We developed it about the same time as I stopped writing academic papers, but if I were still writing them I'd sure want to have this functionality.

gioarma commented 4 years ago

@jbednar Yes, for a person like me who deals with writing reports and academic papers this functionality would be a game changer. I understand you have a lot of stuff to maintain and it's not easy, but I hope you will be able to do it because this is key for making reproducible science easy.