Closed nlhnt closed 10 months ago
@nlhnt Did you ever find a way around this?
@pjacobsen-utilimarc, I get the same error for s3contents versions 0.11.0 and higher when using the docker images of jupyter datascience-notebook (for version 7.0.6 and version 6.5.4). I do not get the error when using version 0.10.1 of s3contents.
This prevents me from updating Jupyter notebook to version 7, since this is only supported since s3contents version 0.11.0.
The error for Jupyter notbeook 7.0.6 combined with s3contents 0.11.1:
[W 2023-12-13 16:32:06.081 ServerApp] nbclassic | error linking extension: The 'contents_manager_class' trait of a ServerApp instance expected a subclass of 'jupyter_server.services.contents.manager.ContentsManager', not the S3ContentsManager S3ContentsManager.
Traceback (most recent call last):
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 342, in link_extension
extension.link_all_points(self.serverapp)
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 224, in link_all_points
self.link_point(point_name, serverapp)
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 214, in link_point
point.link(serverapp)
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 136, in link
linker(serverapp)
File "/opt/conda/lib/python3.11/site-packages/nbclassic/notebookapp.py", line 219, in _link_jupyter_server_extension
return super()._link_jupyter_server_extension(serverapp)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/application.py", line 405, in _link_jupyter_server_extension
self.serverapp.update_config(self.config)
File "/opt/conda/lib/python3.11/site-packages/traitlets/config/configurable.py", line 241, in update_config
self._load_config(config)
File "/opt/conda/lib/python3.11/site-packages/traitlets/config/configurable.py", line 190, in _load_config
setattr(self, name, deepcopy(config_value))
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 748, in __set__
self.set(obj, value)
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 722, in set
new_value = self._validate(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 754, in _validate
value = self.validate(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 2161, in validate
self.error(obj, value)
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 858, in error
raise TraitError(e)
traitlets.traitlets.TraitError: The 'contents_manager_class' trait of a ServerApp instance expected a subclass of 'jupyter_server.services.contents.manager.ContentsManager', not the S3ContentsManager S3ContentsManager.
[I 2023-12-13 16:32:06.082 ServerApp] nbdime | extension was successfully linked.
[W 2023-12-13 16:32:06.085 ServerApp] notebook | error linking extension: The 'contents_manager_class' trait of a ServerApp instance expected a subclass of 'jupyter_server.services.contents.manager.ContentsManager', not the S3ContentsManager S3ContentsManager.
Traceback (most recent call last):
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 342, in link_extension
extension.link_all_points(self.serverapp)
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 224, in link_all_points
self.link_point(point_name, serverapp)
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 214, in link_point
point.link(serverapp)
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 136, in link
linker(serverapp)
File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/application.py", line 405, in _link_jupyter_server_extension
self.serverapp.update_config(self.config)
File "/opt/conda/lib/python3.11/site-packages/traitlets/config/configurable.py", line 241, in update_config
self._load_config(config)
File "/opt/conda/lib/python3.11/site-packages/traitlets/config/configurable.py", line 190, in _load_config
setattr(self, name, deepcopy(config_value))
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 748, in __set__
self.set(obj, value)
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 722, in set
new_value = self._validate(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 754, in _validate
value = self.validate(obj, value)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 2161, in validate
self.error(obj, value)
File "/opt/conda/lib/python3.11/site-packages/traitlets/traitlets.py", line 858, in error
raise TraitError(e)
traitlets.traitlets.TraitError: The 'contents_manager_class' trait of a ServerApp instance expected a subclass of 'jupyter_server.services.contents.manager.ContentsManager', not the S3ContentsManager S3ContentsManager.
@BlessedDisco I believe I got the fix in here https://github.com/danielfrg/s3contents/pull/184 it just hasn't been tagged or pushed to pypi yet
@pjacobsen-utilimarc thanks for the fix. I have tested it by cloning your project and locally building the s3contents package and I can confirm that your fix solves this issue for me.
I just uploaded 0.11.2
that includes the fix.
Thanks all!
Hello, I tried applying this package to my jupyterhub kubernetes instance.
Unfortunately it doesn't seem to work with https://hub.docker.com/r/jupyter/minimal-notebook.
After modyfing the image (I installed s3contents and boto3 and added the config file) the trace raises the following error:
[W 2023-04-01 20:55:13.204 ServerApp] nbclassic | error linking extension: The 'contents_manager_class' trait of a ServerApp instance expected a subclass of 'jupyter_server.services.contents.manager.ContentsManager', not the S3ContentsManager S3ContentsManager.
My jupyter_notebook_config.py: