Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a "Failed validating schema (@jupyterlab/apputils-extension:package)" in Jupyter lab?

Tags:

jupyter-lab

Since upgrading to macOS X Mojave, I've spent a certain amount of time repairing broken virtualenvs.

So far, I haven't been able to get Jupyter Lab working again (it wasn't in a virtualenv, but then virtualenvs weren't the only things that got broken). I've tried uninstalling and reinstalling, removing configuration files, but each time I try running it I get a lot of this in the logs:


    Failed validating 'anyOf' in metaschema['properties']['dependencies']['additionalProperties']:
        {'anyOf': [{'$ref': '#'}, {'$ref': '#/definitions/stringArray'}]}

    On schema['dependencies']['@phosphor/coreutils']:
        '^1.3.0'
[W 21:21:16.507 LabApp] Failed validating schema (@jupyterlab/apputils-extension:package): '^1.3.0' is not valid under any of the given schemas

    Failed validating 'anyOf' in metaschema['properties']['dependencies']['additionalProperties']:
        {'anyOf': [{'$ref': '#'}, {'$ref': '#/definitions/stringArray'}]}

    On schema['dependencies']['@phosphor/coreutils']:
        '^1.3.0'
[E 21:21:16.508 LabApp] {
      "Host": "localhost:8888",
      "Pragma": "no-cache",
      "Accept": "*/*",
      "Authorization": "token 1c25604e6d9a5d08440c050bfe99371ca8ae49d9013b1e60",
      "X-Xsrftoken": "2|67a5ba88|326aa1a39e6b836f582277ddbe216e5d|1564426315",
      "Accept-Language": "en-gb",
      "Accept-Encoding": "gzip, deflate",
      "Cache-Control": "no-cache",
      "Content-Type": "application/json",
      "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.1 Safari/605.1.15",
      "Referer": "http://localhost:8888/lab",
      "Connection": "keep-alive",
      "Cookie": "username-localhost-8888=\"2|1:0|10:1564428075|23:username-localhost-8888|44:NGE5NGUzNjQ3Nzk1NDg3ZDhhZDJjMzMzNGQ4YjIxZTY=|fbad0ac1870311e81a757f7b7f29e518a590866fdff43c8052c0b5948827afdf\"; _xsrf=2|67a5ba88|326aa1a39e6b836f582277ddbe216e5d|1564426315; csrftoken=8Xen0lrpX85mpWqJlTM56tJOBMxzV5bDiYob1RkrjEiqinkGM6ZzPD1JEHDestg5; sessionid=2hqsblwh6s39vdu277opsks0q7o8jkbj; intercom-id-wcfe7111=1ade79ee-89ec-4a57-9726-3bdb8c8e74e4; _ga=GA1.1.1964886736.1538676593; ajs_anonymous_id=%22a58f1e16-4032-42e2-ac80-137208581469%22; ajs_group_id=null; ajs_user_id=null; _mkto_trk=id:318-MHM-176&token:_mch-localhost-1563463668144-88346; visitor_id436452=381310855; visitor_id436452-hash=027543ef80a6862004d3552b234f57b8de495b0ad7e457378187ac92195c938460b84d25649ed617d8a84c7115f6e13098c9becd; gwcc=%7B%22fallback%22%3A%223012155500%22%2C%22clabel%22%3A%22_lc7CMmGwnUQioKMlAM%22%2C%22backoff%22%3A86400%2C%22backoff_expires%22%3A1556887837%7D; django_language=en; intercom-id-wcfe7111=1ade79ee-89ec-4a57-9726-3bdb8c8e74e4; _ga=GA1.1.1964886736.1538676593; __utma=111872281.1964886736.1538676593.1540484638.1549367535.8; __utmz=111872281.1540300566.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __atuvc=1%7C3%2C0%7C4%2C0%7C5%2C1%7C6; __insp_slim=1546950791666; __insp_norec_sess=true; __insp_nv=true; __insp_targlpt=SmVydXNhbGVtIFVuaXZlcnNpdHkgQ29sbGVnZSAtIFN0dWR5IGluIEplcnVzYWxlbSEgLSBKVUM%3D; __insp_targlpu=aHR0cDovL2xvY2FsaG9zdDo4MDAwLw%3D%3D; __insp_wid=638986093; muxData=mux_viewer_id=8a41100f-8b86-4dc0-810a-bbc1a74b500d&msn=0.24001098666179133&sid=a339ac60-5b34-43c0-b576-e39c36d17bfc&sst=1527685911825&sex=1527687794581"
    }
[E 21:21:16.511 LabApp] 500 GET /lab/api/settings/?1564428076484 (::1) 9.81ms referer=http://localhost:8888/lab
[I 21:21:16.689 LabApp] 301 GET /lab/workspaces/auto-Z/?clone (::1) 0.98ms

I'm pretty sure that this is actually some frontend thing that is broken rather than Jupyter itself. The only thing that appears in the browser is a somewhat broken menu, but I can get to Launch Classic Notebook in it, and indeed the old Jupyter notebook seems to work.

What has broken here, and how can I go about fixing it?

like image 957
Daniele Procida Avatar asked Jul 29 '19 19:07

Daniele Procida


1 Answers

It seems that some frontend components were indeed not functioning.

jupyter lab clean && jupyter lab build

failed with an error, in which I spotted:

The engine "node" is incompatible with this module. Expected version "6.* || 8.* || >= 10.*". Got "9.8.0"

I upgraded Node to the latest 12.6.0 version with:

brew upgrade node

after which I was able to run jupyter lab build successfully, and it now runs as expected.

like image 99
Daniele Procida Avatar answered Sep 18 '22 22:09

Daniele Procida