You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Table.show_in_notebook doesn't work in jupyter lab 3 and up #15566
VM157:15 Uncaught ReferenceError: require is not defined
at <anonymous>:15:1
at t.attachWidget (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:1594563)
at t.insertWidget (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:1593914)
at j._insertOutput (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:925250)
at j.onModelChanged (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:922427)
at m (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:1560565)
at Object.l [as emit] (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:1560225)
at e.emit (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:1558470)
at c._onListChanged (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:918850)
at m (jlab_core.6144df8e3fe03e33f880.js?v=6144df8e3fe03e33f880:2:1560565)
changed the title [-]Table.show_in_notebook doesn't work in jupuyter lab 3 and up[/-][+]Table.show_in_notebook doesn't work in jupyter lab 3 and up[/+]on Nov 1, 2023
I can reproduce this on Mac using astropy main 6.1.dev151+g7ab3296cb3 and jupyter lab 3.5.2. However, using VS code notebook the show_in_notebook() method works as expected.
This affects user experience in a particular environment but does not cause a crash or incorrect code results. Users can typically examine the table in a different way if need be.
macOS + Python 3.9.18 + Jupyterlab 3.5.3 + astropy 6.1.dev151+g7ab3296cb3 (supposedly this is very close to last time Tom checked and reproduced)
I got the correct behaviour every time. I don't have a clear idea what could be the relevant differences left. @taldcroft, can you share a little bit more details ?
I'm on macOS 14.2 (running on an M2 arch), and used Safari 17.2 .
@neutrinoceros - hmm do you get a clickable/searchable table ? you can try t.show_in_browser(jsviewer=True) which gives an interactive table in a new HTML page, show_in_notebook should give the same in the notebook.
And I get the same js error as above (require is not defined), because as I said jupyterlab doesn't use requirejs.
Activity
[-]Table.show_in_notebook doesn't work in jupuyter lab 3 and up[/-][+]Table.show_in_notebook doesn't work in jupyter lab 3 and up[/+]pllim commentedon Nov 1, 2023
What are the versions of your Jupyter stack? Also did you try with 6.0.dev? Thanks!
saimn commentedon Nov 2, 2023
I think recent versions of
jupyter notebookare based onjupyter lab, which doesn't use requirejs to load JavaScript libraries...rag-hav commentedon Dec 4, 2023
Unable to reproduce with 6.0.0 dev
taldcroft commentedon Dec 7, 2023
I can reproduce this on Mac using astropy main 6.1.dev151+g7ab3296cb3 and jupyter lab 3.5.2. However, using VS code notebook the
show_in_notebook()method works as expected.taldcroft commentedon Dec 7, 2023
Triage:
This affects user experience in a particular environment but does not cause a crash or incorrect code results. Users can typically examine the table in a different way if need be.
neutrinoceros commentedon Dec 13, 2023
I couldn't reproduce this so far. I've tried:
I got the correct behaviour every time. I don't have a clear idea what could be the relevant differences left.
@taldcroft, can you share a little bit more details ?
I'm on macOS 14.2 (running on an M2 arch), and used Safari 17.2 .
saimn commentedon Dec 13, 2023
@neutrinoceros - hmm do you get a clickable/searchable table ? you can try
t.show_in_browser(jsviewer=True)which gives an interactive table in a new HTML page,show_in_notebookshould give the same in the notebook.And I get the same js error as above (
require is not defined), because as I said jupyterlab doesn't use requirejs.neutrinoceros commentedon Dec 14, 2023
@saimn 🤦🏻♂️ ... I didn't get that was the problem. In fact I don't get pagination in any of the envs I reported yesterday !
Excellent, thank you !
same here. To be exact the error I see in my setup is
ReferenceError: Can't find variable: requirebut this seems to be the exact same problem.