3

Currently, a jupyter notebook does not show the lateral table of contents. All the other notebooks do. In fact, for that notebook under menu->edit the nbextensions config disappeared, so, it looks like that notebook does not load the extension.

My jupyter version is 4.4.0.

How to fix that notebook?

sono
  • 426
  • 7
  • 15

6 Answers6

0

Apparently, all it needs is to shutdown the notebook. After restarting it, all works fine. I suppose that problem happens when the notebook has been closed wrongly without the proper "close and halt" procedure.

sono
  • 426
  • 7
  • 15
0

I have the problem with Jupyter notebook version 6.1.4. After installing nbextensions and enabling extension "Table of Contents (2)" (as "toc" and "toc2" don't work), I cannot obtain the TOC of an a notebook (2.8 MB), while new notebooks have a table of contents.

Reloading, reopening, restarting jupyter does not help, even after a long wait (> 15 min).

I have tried with browsers Mozilla Firefox version 83 and Chromium version 87.

However, a workaround is to create a new notebook (with TOC), then copy all cells from old notebook to new notebook. In order to do this, this might be useful:

Actually I could not copy all cells at once, I had to do three partial copies.

Alas, my method is not only painful but also ineffective in the long term, as the TOC has disappeared again.

Restarting the computer worked.

Pierre ALBARÈDE
  • 374
  • 3
  • 10
0

My solution in these cases is, make a copy (File <Make a Copy), delete the original notebook and rename the copy (File <Rename)

efueyo
  • 137
  • 7
0

For me it seems that one of the following steps worked:

  • Update all packages and jupyter notebook to the latest version using conda
  • Uninstall then install again the nbextensions configurator
  • Reboot the computer
0

I found the solution to this problem. All those advises like "close and then re-open", "clean output of the notebook" or "re-install extensions" won't work. The problem is in the javascript load timeouts.

In firefox press F12 and press on the red icon in the top right corner - you will see that you have an error

Load timeout for modules: 
custom/custom,nbextensions/nbextensions_configurator/config_menu/main,

bla-bla-bla...

How to solve:

  1. close the notebook in jupyter, open your ipynb file in any text editor, go to the end of it - you will find "metadata" section. Add the line

    "setTimeout": 120

  2. create a file ~/.jupyter/custom/custom.js if you don't have it (I have Linux, where it is in Windows - I have no idea, google for it) and put this contents into this file:

    window.requirejs.config({ waitseconds: 90, // default is 30s });

This page describes the problem in detail: https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1195

Ihor B.
  • 1,216
  • 13
  • 16
0

In my case, disabling my ad-blocker brought the table of contents back.

Thomas
  • 283
  • 1
  • 5
  • 9