jupyterlite / xeus-python-kernel

xeus-python in JupyterLite
https://xeus-python-kernel.readthedocs.io
BSD 3-Clause "New" or "Revised" License
30 stars 19 forks source link

Failed to load resource: the server responded with a status of 404 #177

Closed MRYingLEE closed 9 months ago

MRYingLEE commented 9 months ago

Description

In https://jtp.io/lit/lab/index.html, run "import pandas", the following error happened:

Failed to load resource: the server responded with a status of 404 () index.js:540 Error: Shared module @jupyterlab/debugger doesn't exist in shared scope default at ensureExistence (consumes:19:1) at consumes:101:1 at consumes:82:1 at webpack/sharing/consume/default/@jupyterlab/debugger (consumes:151:1) at consumes:265:1 at Array.forEach () at webpack_require.f.consumes (consumes:248:1) at ensure chunk:6:1 at Array.reduce () at webpack_require.e (ensure chunk:5:1) (anonymous) @ index.js:540 /lit/api/translations/default.json:1

    Failed to load resource: the server responded with a status of 404 ()

index.es6.js:308 TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) at te.items (model.js:183:21) at te.items (model.js:563:28) at te.items (model.js:601:29) at J._onModelRefreshed (listing.js:1686:40) at d (index.es6.js:555:18) at e.emit (index.es6.js:513:17) at s.emit (index.es6.js:112:17) at te.onRunningChanged (model.js:513:25) at d (index.es6.js:555:18) at e.emit (index.es6.js:513:17) e.exceptionHandler @ index.es6.js:308 mock-socket.js:763 WebSocket connection to 'wss://jtp.io/lit/api/kernels/c5fe2f87-7770-406f-91eb-64515e61dcce/channels?session_id=e3f1f6d2-6b9a-4f2b-b36d-eb43a66e0ba8' failed w @ mock-socket.js:763 mock-socket.js:763 WebSocket connection to 'wss://jtp.io/lit/api/kernels/c5fe2f87-7770-406f-91eb-64515e61dcce/channels?session_id=652681c8-bd2f-4c4c-8c73-f0eb9b5a5acd' failed w @ mock-socket.js:763 index.es6.js:308 TypeError: object null is not iterable (cannot read property Symbol(Symbol.iterator)) at te.items (model.js:183:21) at te.items (model.js:563:28) at te.items (model.js:601:29) at J._onModelRefreshed (listing.js:1686:40) at d (index.es6.js:555:18) at e.emit (index.es6.js:513:17) at s.emit (index.es6.js:112:17) at te.onRunningChanged (model.js:513:25) at d (index.es6.js:555:18) at e.emit (index.es6.js:513:17) e.exceptionHandler @ index.es6.js:308 mock-socket.js:763 WebSocket connection to 'wss://jtp.io/lit/api/kernels/c5fe2f87-7770-406f-91eb-64515e61dcce/channels?session_id=f4ddb789-279c-4bc3-9cca-1c2c0305eea9' failed w @ mock-socket.js:763 213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2 Uncaught (in promise) DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/xpython_wasm.js' failed to load. at Object.initialize (https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:10713) at https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:10009 at new Promise () at new (https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:9987) at https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:9934 at Object. (https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:11472) at 213 (https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:11476) at r (https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:11604) at https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:11926 at https://jtp.io/lit/extensions/@jupyterlite/xeus-python-kernel/static/213.efd3bb893df42f78e3eb.js?v=efd3bb893df42f78e3eb:2:11934 default.js:493 Uncaught (in promise) Error: Kernel is dead at C._sendMessage (default.js:493:19) at C._sendKernelShellControl (default.js:448:14) at C.sendShellMessage (default.js:424:21) at C.requestExecute (default.js:778:21) at e.execute (widget.js:630:31) at e.execute (widget.js:1182:43) at actions.js:1889:54 at actions.js:1807:50 at Array.map () at e.runSelected (actions.js:1807:37)

Reproduce

  1. Go to https://jtp.io/lit/lab/index.html
  2. Add a code cell
  3. Run "import pandas".
  4. See error in the console

I understand that pandas is not pre-installed. I just happened to check. It seems it is only related to the latest version.

Expected behavior

Pandas is not pre-installed, so "no module pandas available" should be mentioned.

Context

jtpio commented 9 months ago

In https://jtp.io/lit/lab/index.html, run "import pandas", the following error happened:

Thanks @MRYingLEE for reporting.

I think it could be because the test deployment (available in https://github.com/jtpio/lit) does not define an environment.yml with pandas in it?

jtpio commented 9 months ago

Ah actually it looks like one the extension files can't be found:

image

Will have a look.

jtpio commented 9 months ago

There is indeed a difference between 1.0.0a0 and 1.0.0a1 for the wheel size:

1.0.0a0

image

1.0.0a1

image

jtpio commented 9 months ago

For those landing here, https://github.com/jupyterlite/xeus-python-kernel/pull/181 should have fixed it, and is released in 1.0.0a3: https://github.com/jupyterlite/xeus-python-kernel/releases/tag/v1.0.0a3