Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#62069 closed defect (fixed)

Jupyterlab cannot open or create notebooks

Reported by: NF6X (Mark J. Blair) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-jupyterlab

Description

Since py38-jupyterlab was updated a few days ago, I can no longer open existing jupyterlab notebooks or create new ones.

When I try to open an existing notebook, the browser interface opens a modal dialog titled "File Load Error for myfile.ipynb", containing an error message like:

Unreadable Notebook: /full/path/to/myfile.ipynb FileNotFoundError(2, 'No such file or directory')

When I try to create a new notebook, the browser interface opens a model dialog titled "Error" with an error message of "Unhandled error". After closing it, the browerser interface opens another modal dialog titled "Launcher Error" with an error message of "e is undefined". The server prints out a traceback like the following one in the shell that it was launched from with the jupyter-lab-3.8 command:

[I 2021-01-16 20:04:29.599 ServerApp] Creating new notebook in 
[E 2021-01-16 20:04:29.599 ServerApp] Uncaught exception POST /api/contents?1610856269595 (127.0.0.1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='POST', uri='/api/contents?1610856269595', version='HTTP/1.1', remote_ip='127.0.0.1')
    Traceback (most recent call last):
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jupyter_server/services/contents/handlers.py", line 196, in post
        await self._new_untitled(path, type=type, ext=ext)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jupyter_server/services/contents/handlers.py", line 149, in _new_untitled
        model = await ensure_async(self.contents_manager.new_untitled(
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jupyter_server/services/contents/manager.py", line 397, in new_untitled
        return self.new(model, path)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/jupyter_server/services/contents/manager.py", line 416, in new
        model['content'] = new_notebook()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nbformat/v4/nbbase.py", line 164, in new_notebook
        validate(nb)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nbformat/v4/nbbase.py", line 39, in validate
        return validate(node, ref=ref, version=nbformat)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nbformat/validator.py", line 268, in validate
        for error in iter_validate(nbdict, ref=ref, version=version,
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nbformat/validator.py", line 303, in iter_validate
        validator = get_validator(version, version_minor, relax_add_props=relax_add_props)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nbformat/validator.py", line 57, in get_validator
        schema_json = _get_schema_json(v, version=version, version_minor=version_minor)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nbformat/validator.py", line 94, in _get_schema_json
        with open(schema_path) as f:
    FileNotFoundError: [Errno 2] No such file or directory: '/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/nbformat/v4/nbformat.v4.5.schema.json'
[W 2021-01-16 20:04:29.602 ServerApp] Unhandled error
[E 2021-01-16 20:04:29.602 ServerApp] {
      "Host": "localhost:8888",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:84.0) Gecko/20100101 Firefox/84.0",
      "Accept": "*/*",
      "Accept-Language": "en-US,en;q=0.5",
      "Accept-Encoding": "gzip, deflate",
      "Referer": "http://localhost:8888/lab",
      "Content-Type": "text/plain;charset=UTF-8",
      "Authorization": "token e9e6fcd021171a539b7ddf7a1e285f603db5e51b850037fb",
      "X-Xsrftoken": "2|1692b18a|73670f3d61d91836362c473cb081f2d0|1609792514",
      "Origin": "http://localhost:8888",
      "Content-Length": "29",
      "Connection": "keep-alive",
      "Cookie": "username-localhost-8888=\"2|1:0|10:1610856247|23:username-localhost-8888|44:OWUwM2ZlMmVkNWJhNDkxN2FkZTg4ZDBlNTNlNTg1MmY=|d12903eb72fd1a36ff21b840aeb6b87bc03c9be4756c80200d36739ce5e486be\"; _xsrf=2|1692b18a|73670f3d61d91836362c473cb081f2d0|1609792514",
      "Pragma": "no-cache",
      "Cache-Control": "no-cache"
    }
[E 2021-01-16 20:04:29.602 ServerApp] 500 POST /api/contents?1610856269595 (127.0.0.1) 4.06ms referer=http://localhost:8888/lab

Prior to discovering this fatal bug, it was not even possible to launch jupyterlab due to the bug in ticket #62066 (now fixed). Basically, the recent update completely broke jupyterlab. I've lost two days of work to this since I unfortunately decided to update my ports two nights ago.

Change History (4)

comment:1 Changed 4 years ago by jmroot (Joshua Root)

Owner: set to stromnov
Port: py-jupyterlab added; py38-jupyterlab removed
Status: newassigned

comment:2 Changed 4 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In ae50656b9d6d70a9c105da51efdae4b356ad11eb/macports-ports (master):

py-nbformat: update to 5.1.2

Closes: #62069

comment:3 Changed 4 years ago by reneeotten (Renee Otten)

I just updated py-nbformat to its latest version, that seems to resolve the issue you show above for me.

comment:4 Changed 4 years ago by NF6X (Mark J. Blair)

Yay! It seems to be working now. Thank you!

Note: See TracTickets for help on using tickets.