Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[collapsible_headings] When using jupyter_server + nbclassic, collapsible headings not working #1642

Open
yacchin1205 opened this issue Jun 3, 2023 · 0 comments · May be fixed by #1643
Open

Comments

@yacchin1205
Copy link
Contributor

When using jupyter_server + nbclassic, When I open the notebook in my browser, I get the following error message and collapsible headings does not work. (Triangles at headings are not displayed.)

main.js?v=20230603045922:1076 [collapsible_headings] error: TypeError: Cannot read properties of undefined (reading 'split')
    at patch_Tooltip (main.js?v=20230603045922:598:73)

Steps to Reproduce

  1. Build and run Dockerfile based on docker-stacks or launch the jupyter notebook using MyBinder: https://mybinder.org/v2/gist/yacchin1205/156752d2a08004026f0b10c3a1ff472b/HEAD?urlpath=tree
  2. Once the jupyter notebook server is open, Create the new notebook
  3. Open the notebook
  4. Open your browser's developer tools and you will find the error log above and that collapsible headings does not work.

Cause of this error

This error occurs in the following code.

if (Number(((sys_info) ? sys_info.notebook_version : Jupyter.version).split(".")[0]) >= 5) {

The code expects the global variable sys_info to have a notebook_version, but the combination of jupyter_server and nbclassic seems to provide a sys_info without a notebook_version.

image

Also, nbclassic seems to give 1.0.0 as the Jupyter.version, so we will need to consider that.

https://github.com/jupyter/nbclassic/blob/b3692e330e7452fdb3aef7b53abe51ef22c2cfc5/nbclassic/static/base/js/namespace.js#L76

@yacchin1205 yacchin1205 linked a pull request Jun 3, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant