Jupyter-contrib / jupyter_nbextensions_configurator

A jupyter notebook serverextension providing config interfaces for nbextensions.
Other
981 stars 121 forks source link

404 GET /nbextensions/nbextensions_configurator/list?_=1654165352962 #136

Open wangyu-sd opened 2 years ago

wangyu-sd commented 2 years ago

图片

piscesvivian commented 2 years ago

Same Problem。

jupyter-lab Got an error

[D 2022-06-22 23:43:40.724 ServerApp] Traceback (most recent call last):
      File "/root/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 351, in load_extension
        extension.load_all_points(self.serverapp)
      File "/root/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 231, in load_all_points
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/root/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 231, in <listcomp>
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
      File "/root/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 224, in load_point
        return point.load(serverapp)
      File "/root/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyter_server/extension/manager.py", line 150, in load
        return loader(serverapp)
      File "/root/anaconda3/envs/jupyterlab/lib/python3.8/site-packages/jupyter_nbextensions_configurator/__init__.py", line 247, in load_jupyter_server_extension
        if static_files_path not in webapp.settings['nbextensions_path']:
    KeyError: 'nbextensions_path'
doctapp commented 2 years ago

Same error with jupyter/all-spark-notebook:spark-3.3.0@sha256:8c8f3d458f3d320e799fa0da8457dbffe9fc5ad004256163a470220b17dba3fb using nbclassic.

Any idea on a fix?

Thanks

Paperone80 commented 2 years ago

Hi,

I am getting the same error, I temporarily fixed it by adding this to the

file `...python3.9/site-packages/jupyter_nbextensions_configurator/init.py' Line 247-ish

    # make sure our static files are available
    static_files_path = os.path.normpath(os.path.join(
        os.path.dirname(__file__), 'static'))
    logger.debug(
        '  Editing nbextensions path to add {}'.format(static_files_path))
    >>>> 
    nbextensions_path = webapp.settings.get('nbextensions_path', [])
    webapp.settings['nbextensions_path'] = nbextensions_path
    <<<<<<
    if static_files_path not in webapp.settings['nbextensions_path']:
        webapp.settings['nbextensions_path'].append(static_files_path)

Problem is when nbextensions_path is not a key yet in the webapp.settings for whatever reason...

dleen commented 2 years ago

Will be fixed in: https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator/pull/141

Thiswycf commented 2 months ago

SOLVED, jupyter-server v2 is incompatible with notebook v6, thus the version of jupyter-server MUST less than v2, eg. 1.13.4

pip install jupyter-server==1.13.4

csdn link