Apologies if a similar issue has been opened, but I wasn't able to find it.
The notebook was working just fine yesterday, but now I get this error.
[W 05:01:21.353 NotebookApp] Error loading server extension jupyter_nbextensions_configurator
Traceback (most recent call last):
File "/home/mustafa/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 1271, in init_server_extensions
mod = importlib.import_module(modulename)
File "/home/mustafa/anaconda3/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 978, in _gcd_import
File "<frozen importlib._bootstrap>", line 961, in _find_and_load
File "<frozen importlib._bootstrap>", line 948, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'jupyter_nbextensions_configurator'
The effect of this error is that I cannot open new notebooks. The old notebooks work just fine.
I don't know if this is relevant but I don't have any extensions. I remember I installed an extension a while back but recall deleting it.
There are no files in ~/.ipython/nbextensions or ~/.ipython/extensions
I'm using Linux Elementary OS Loki (based on Ubuntu16.04) 64-bit.
conda --version == 4.3.22
jupyter --version == 4.3.0
Edit: pip list shows that I've "widgetsnbextensions"
Ping @jcb91 @jfbercher
An error loading an extension shouldn't prevent you from creating a new notebook. :confused:
The list of enabled extensions is in ~/.jupyter/nbconfig/notebook.json.
Here's the output from notebook.json
{
"load_extensions": {
"nbextensions_configurator/config_menu/main": true,
"collapsible_headings/main": true
},
"Notebook": {
"Header": false,
"Toolbar": true
}
}
I've both deleted it and removed the lines inside load_extensions and still shows the error and prevents any new notebook. Any notebook made elsewhere is working just fine. Just no new ones.
An error loading an extension shouldn't prevent you from creating a new notebook. 馃槙
I fully agree with this. It looks to me as though you have the jupyter_nbextensions_configurator serverextension enabled in config (this is in server config rather than frontend js config files, where JavaScript nbextensions are enabled, which is why the edit hasn't fixed it for you), but you don't have the required python package installed. In situations like this, I would expect notebook server to log the failed import as an error, but continue loading anyway. Is this not the specified behaviour? At any rate, since the extension code isn't even present to load, it can't be at fault directly :/
To fix this, you should hopefully be able to just run
jupyter serverextension disable --sys-prefix jupyter_nbextensions_configurator
I add the --sys-prefix flag since it's the default for anaconda installs, but you may also want/need to run the same using the --user or --system flag instead, depending on how you enabled it in the forest place. Alternatively, you should be able to find the keys to manually remove in the jupyter_notebook_config.json (or .py) file(s) in one or more of the config paths in the output of jupyter --paths.
Hope that makes sense? Let me know if not!
you have the jupyter_nbextensions_configurator serverextension enabled in config (this is in server config rather than frontend js config files,
Aha, thanks for spotting my mistake there.
In situations like this, I would expect notebook server to log the failed import as an error, but continue loading anyway. Is this not the specified behaviour?
That is indeed what it should be doing. I wonder if these are actually two separate issues that just happen to be showing up together.
jupyter serverextension disable --sys-prefix jupyter_nbextensions_configurator
Ran the command. Error is gone. Still can't create new notebooks.
I don't know if this was appearing before (most probably did) but now I've noticed this
404 GET /nbextensions/nbextensions_configurator/tree_tab/main.js?v=20170620173117 (127.0.0.1) 29.03ms referer=http://localhost:8888/tree
Error is gone. Still can't create new notebooks.
Ok, my guess is that @takluyver is correct & you have another unrelated error that just happens to have shown up at the same time as the missing serverextension.
I don't know if this was appearing before (most probably did) but now I've noticed this
This is another hangover from jupyter_nbextensio s_configurator, which you can get rid of by running
jupyter nbextension disable --sys-prefix nbextensions_configurator/tree_tab/main
As before, you may also want/need to substitute the --sys-prefix flag for --system or --user. By default, the configurator also enables an nbextension with the require path nbextensions_configurator/config_menu/main, so you may also want/need to disable that one.
LoL .. It turns that the second problem after the original error is that .... Wait for it .... the pop up blocker was doing its thing on new tabs.
It's working now upon disabling the pop up blocker.
That's annoying. Which browser are you using? Is it the built-in popup blocker, or an extra one in an extension? We try to work around popup blockers.
It's the new Vivaldi browser. A great browser.
jcb91's response worked for me, thanks!
In my way ,I just run 'pip install jupyter_nbextensions_configurator',and my problem is solved.
'pip install --upgrade --force-reinstall jupyter_nbextensions_configurator --user'
maybe more useful.
Most helpful comment
In my way ,I just run 'pip install jupyter_nbextensions_configurator',and my problem is solved.