[MacPorts] #62069: Jupyterlab cannot open or create notebooks

MacPorts noreply at macports.org
Sun Jan 17 04:14:01 UTC 2021


#62069: Jupyterlab cannot open or create notebooks
--------------------+-----------------------------
 Reporter:  NF6X    |      Owner:  (none)
     Type:  defect  |     Status:  new
 Priority:  Normal  |  Milestone:
Component:  ports   |    Version:
 Keywords:          |       Port:  py38-jupyterlab
--------------------+-----------------------------
 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/62069>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list