danielfrg / s3contents

Jupyter Notebooks in S3 - Jupyter Contents Manager implementation
Apache License 2.0
248 stars 88 forks source link

Jupyter fails to open notebook using MinIO #96

Closed edergillian closed 3 years ago

edergillian commented 4 years ago

I got this error when trying to create a notebook on MinIO:

Traceback (most recent call last): 
File "/opt/conda/lib/python3.7/site-packages/tornado/web.py", 
  line 1703, in _execute result = await result 
File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", 
  line 742, in run yielded = self.gen.throw(*exc_info) # type: ignore 
File "/opt/conda/lib/python3.7/site-packages/notebook/services/contents/handlers.py", 
  line 202, in post yield self._new_untitled(path, type=type, ext=ext) 
File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", 
  line 735, in run value = future.result() 
File "/opt/conda/lib/python3.7/site-packages/tornado/gen.py", 
  line 748, in run yielded = self.gen.send(value) 
File "/opt/conda/lib/python3.7/site-packages/notebook/services/contents/handlers.py", 
  line 157, in _new_untitled self._finish_model(model) 
File "/opt/conda/lib/python3.7/site-packages/notebook/services/contents/handlers.py", 
  line 86, in _finish_model self.set_header('Last-Modified', model['last_modified']) 
File "/opt/conda/lib/python3.7/site-packages/tornado/web.py", 
  line 374, in set_header self._headers[name] = self._convert_header_value(value) 
File "/opt/conda/lib/python3.7/site-packages/tornado/web.py", 
  line 416, in _convert_header_value raise TypeError("Unsupported header value %r" % value) TypeError: Unsupported header value None

The file is actually saved on MinIO, but it does not open on Jupyter Notebook web GUI

This is my configuration:

from s3contents import S3ContentsManager

c = get_config()

# Tell Jupyter to use S3ContentsManager for all storage.
c.NotebookApp.contents_manager_class = S3ContentsManager
c.S3ContentsManager.access_key_id = "**"
c.S3ContentsManager.secret_access_key = "**"
c.S3ContentsManager.endpoint_url = "http://minio.minio:9000/"
c.S3ContentsManager.bucket = "bucket"
c.S3ContentsManager.prefix = "prefix"
c.S3ContentsManager.signature_version = "s3v4"
danielfrg commented 3 years ago

This is probably not an issue in newer versions pls open a new issue if this is still the case.