Jupyter Notebook Extension: Snippets menu is not working after enabling nbextensions

679 Views Asked by At

After I have installed nbextensions, I have enabled a few extensions such as Hinterland, Snippets, and Snippets Menu. The other extensions are working pretty fine, except for Snippets Menu.

I am not sure why the snippet menu tab is not showing, in which supposingly I should be able access the snippet codes of numpy etc from its drop-down menu.

I have tried multiple methods like reinstall nbextensions, refreshing my session, restarting the server, but noun of them work.Current view

Ideally it should appear as sth like this Snippets Menu

1

There are 1 best solutions below

0
Captain Morgan On

I'm not exactly sure if the problem you're having stems from the same I had earlier, but this might help.

I had everything up and running perfectly. I wiped and reinstalled Python to go to 3.10 for no real reason. Snippets_menu no longer showed. Not sure if other extensions flopped as a result. Dug around for hours trying to resolve or find a path to go down to no avail. Inspected notebook page in chrome. The point of the last blurb is to help others with similar issues know where to start looking.

SOLUTION:

snippets_menu seems to not load because there's an issue with the pandas sub_menu, thus breaking the whole thing. Go to, \AppData\Roaming\jupyter\nbextensions\snippets_menu\snippets_submenus_python\pandas.js, and enclose the stuff with single quotes (label_count, label, label_mean) to either double quotes or \' instead of singles.

To open the AppData directory, I usually enter %appdata% into the start menu. I.e. press Win key -> type %appdata% -> hit Enter key.

Everything here was in Windows context. Sorry Mac & Unix users. Maybe a comment from someone can add to this.