You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Building RustPython Demo - ModuleNotFoundError binascii #4931
With a self-hosted RustPython WASM Demo, built with npm run dist the import_pypi snippet does not seem to function correctly, with the following traceback (tested on two different devices, one running Windows 11 and one running Ubuntu 22.04):
Traceback (most recent call last):
File "<wasm>", line 2, in <module>
File "whlimport", line 2, in <module>
File "zipfile", line 6, in <module>
ModuleNotFoundError: No module named 'binascii'
I'm uncertain whether this is relevant or not, but on both the Windows 11 device and the Ubuntu 22.04 device, npm run dev does not seemingly fail (since it does end up hosting the demo) but does present the error
error: failed getting Wasm module for 'D:\Users\USERNAME\Downloads\RustPython\target\wasm32-unknown-unknown\debug\rustpython_wasm.wasm'
Caused by:
0: failed to parse input as wasm
1: failed to parse code section
2: locals exceed maximum (at offset 18853405)
Error: Running the wasm-bindgen CLI
Caused by: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit code: 1
full command: "C:\\Users\\USERNAME\\.cargo\\bin\\wasm-bindgen.exe" "D:\\Users\\USERNAME\\Downloads\\RustPython\\target\\wasm32-unknown-unknown\\debug\\rustpython_wasm.wasm" "--out-dir" "D:\\Users\\USERNAME\\Downloads\\RustPython\\wasm\\lib\\pkg" "--typescript" "--target" "bundler" "--out-name" "index" "--debug"
i 「wdm」: Hash: dc93d439250af29bad26
Version: webpack 4.46.0
Time: 8252ms
Built at: 27/04/2023 17:03:09
Or maybe I'm just missing something obvious, if so, I do apologise!
Activity
youknowone commentedon Apr 28, 2023
I am sorry. I found our recent version of rustpython-wasm has a bug not to enable stdlib correctly.
youknowone commentedon Apr 28, 2023
Please reopen the issue if the problem remains, thank you for reporting!