Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Pyodide 0.24.0 #61

Closed
wants to merge 3 commits into from
Closed

Update to Pyodide 0.24.0 #61

wants to merge 3 commits into from

Conversation

michaelweinold
Copy link

Update to the latest release: https://github.com/pyodide/pyodide/releases

@github-actions
Copy link
Contributor

lite-badge 👈 Try it on ReadTheDocs

@michaelweinold
Copy link
Author

...hmm, hash seems to be wrong. Let me check.

@jtpio jtpio added the enhancement New feature or request label Sep 14, 2023
@jtpio
Copy link
Member

jtpio commented Sep 14, 2023

Maybe running jlpm at the top level will help refresh the yarn.lock with the correct hash.

@michaelweinold
Copy link
Author

I'll gladly take suggestions now 😅

@jtpio
Copy link
Member

jtpio commented Sep 14, 2023

AssertionError: /tmp/pytest-of-runner/pytest-0/test_pyodide_subprocess_cli_lo0/a_lite_dir/_output/static/pyodide/repodata.json not found

This might be one of the changes in Pyodide 0.24.0.

@jtpio
Copy link
Member

jtpio commented Sep 14, 2023

The Pyodide changelog leads to this PR: pyodide/pyodide#3824

@michaelweinold
Copy link
Author

Thanks - that did the trick.

@jtpio
Copy link
Member

jtpio commented Sep 14, 2023

Nice. Were you able to check on the ReadTheDocs preview if everything was behaving as expected?

And that peewee is indeed available?

https://jupyterlite-pyodide-kernel--61.org.readthedocs.build/en/61/_static/lab/index.html

@michaelweinold
Copy link
Author

I checked, but could not get anything to run. The kernel remains unresponsive. This has been my experience with both the pyodide and emscripten-forge based JuptyerLite from time to time. I deleted the IndexedDB and used incognito mode in Chrome, but was unable to get anything so far:

Screenshot 2023-09-14 at 11 24 29

Who knows what the issue is this time - perhaps a complete restart of my machine would help. Did you get to a point where you could use the kernel?

@michaelweinold
Copy link
Author

...well, it seems that the unresponsive state is related to (JS browser output):

Registering new JupyterLite ServiceWorker https://jupyterlite-pyodide-kernel--61.org.readthedocs.build/en/61/_static/service-worker-f7de73d.js
service-manager.ts:52 JupyterLite ServiceWorker was sucessfully registered
index.ts:235 Kernel filesystem and JupyterLite contents will be synced
index.js:51 Pyodide contents will be synced with Jupyter Contents
pyodide.asm.js:9 Loading micropip, packaging
pyodide.asm.js:9 Loaded packaging, micropip
kernel.js:40 Uncaught (in promise) PythonError: Traceback (most recent call last):
  File "/lib/python311.zip/_pyodide/_base.py", line 571, in eval_code_async
    await CodeRunner(
  File "/lib/python311.zip/_pyodide/_base.py", line 396, in run_async
    await coroutine
  File "<exec>", line 4, in <module>
  File "/lib/python3.11/site-packages/piplite/__init__.py", line 2, in <module>
    from .piplite import install
  File "/lib/python3.11/site-packages/piplite/piplite.py", line 13, in <module>
    from micropip import _micropip
ImportError: cannot import name '_micropip' from 'micropip' (/lib/python3.11/site-packages/micropip/__init__.py)

    at new_error (cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.js:9:12519)
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at _PyCFunctionWithKeywords_TrampolineCall (cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.js:9:123040)
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.wasm
    at Module.callPyObjectKwargs (cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.js:9:81732)
    at Module.callPyObject (cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.js:9:82066)
    at wrapper (cdn.jsdelivr.net/pyodide/v0.24.0/full/pyodide.asm.js:9:58562)

@michaelweinold
Copy link
Author

It looks like micropip/_micropip.py was removed with pyodide/micropip@926caa7

@michaelweinold
Copy link
Author

Do you think we should merge this one and then fix the _micropip-related issue in a separate PR?

@michaelweinold
Copy link
Author

Closing in favour of #62

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants