Open wangyu-sd opened 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'
Same error with jupyter/all-spark-notebook:spark-3.3.0@sha256:8c8f3d458f3d320e799fa0da8457dbffe9fc5ad004256163a470220b17dba3fb using nbclassic.
Any idea on a fix?
Thanks
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...