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

Unable to run pyodide #1321

Closed
hieutrluu opened this issue May 6, 2024 · 3 comments · Fixed by #1323
Closed

Unable to run pyodide #1321

hieutrluu opened this issue May 6, 2024 · 3 comments · Fixed by #1323
Labels
bug Something isn't working

Comments

@hieutrluu
Copy link

Describe the bug

I follow the instruction

python3 pyodide/build_and_serve.py
# then in another terminal
cd frontend
PYODIDE=true pnpm dev

But I receive the error and screenshot

Traceback (most recent call last): File "/lib/python311.zip/_pyodide/_base.py", line 573, in eval_code_async await CodeRunner( File "/lib/python311.zip/_pyodide/_base.py", line 395, in run_async await coroutine File "<exec>", line 4, in <module> File "/lib/python3.11/site-packages/micropip/_commands/install.py", line 142, in install await transaction.gather_requirements(requirements) File "/lib/python3.11/site-packages/micropip/transaction.py", line 204, in gather_requirements await asyncio.gather(*requirement_promises) File "/lib/python3.11/site-packages/micropip/transaction.py", line 217, in add_requirement await self.add_wheel(wheel, extras=set(), specifier="") File "/lib/python3.11/site-packages/micropip/transaction.py", line 383, in add_wheel await wheel.download(self.fetch_kwargs) File "/lib/python3.11/site-packages/micropip/transaction.py", line 100, in download with ZipFile(data) as zip_file: ^^^^^^^^^^^^^ File "/lib/python311.zip/zipfile.py", line 1301, in __init__ self._RealGetContents() File "/lib/python311.zip/zipfile.py", line 1368, in _RealGetContents raise BadZipFile("File is not a zip file") zipfile.BadZipFile: File is not a zip file
Screenshot 2024-05-06 at 14 45 37

Environment

{
"marimo": "0.4.7",
"OS": "Darwin",
"OS Version": "23.0.0",
"Processor": "arm",
"Python Version": "3.12.1",
"Binaries": {
"Browser": "124.0.6367.119",
"Node": "v20.11.0"
},
"Requirements": {
"click": "8.1.3",
"importlib-resources": "missing",
"jedi": "0.19.1",
"markdown": "3.6",
"pymdown-extensions": "10.8",
"pygments": "2.17.2",
"tomlkit": "0.12.4",
"uvicorn": "0.29.0",
"starlette": "0.37.2",
"websocket": "missing",
"typing-extensions": "4.11.0",
"black": "23.3.0"
}
}

Code to reproduce

No response

@hieutrluu hieutrluu added the bug Something isn't working label May 6, 2024
@mscolnick
Copy link
Contributor

Is there anything that was output in the root level dist directory? Your might need to build the repo once (python build), or just edit any file to trigger a build while running pyodide/build_and_serve.py

@dmadisetti
Copy link
Collaborator

So I sometimes have to patch: frontend/src/core/pyodide/worker/getMarimoWheel.ts

to just return http://localhost:8000/dist/marimo-0.x.x-py3-none-any.whl

I figured maybe I was just doing something wrong

@mscolnick
Copy link
Contributor

I am actually working on a fix for this now so these can stay in sync. Mostly just didnt invest much time in the local development mode for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants