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
Attempting an example for the first time, and it looks like there's a typo in the example code.
I run componentize-py -d ../../wit -w wasi:http/[email protected] componentize app -o http.wasm and get this traceback:
Traceback (most recent call last):
File "/home/daedalus/src/wasm-experiments/.venv/bin/componentize-py", line 8, in <module>
sys.exit(script())
AssertionError: Traceback (most recent call last):
File "/0/app.py", line 10, in <module>
import poll_loop
File "/bundled/poll_loop.py", line 17, in <module>
from proxy.imports.streams import StreamErrorClosed, InputStream
ImportError: cannot import name 'StreamErrorClosed' from 'proxy.imports.streams' (/world/proxy/imports/streams.py). Did you mean: 'StreamError_Closed'?
It looks like bundled/poll_loop.py does indeed try to import and use StreamErrorClosed instead of StreamError_Closed, but when I try to make the change locally (so I can maybe file a PR), it doesn't appear to fix the error.
I clearly don't understand how Python imports work with wasmtime and/or componentize-py. What am I missing? Is it pulling in the import from another path or a prebuilt module somewhere?
No rush, just wanted to start learning about wasm and coming from my background with Python seemed a reasonable entry point.
The text was updated successfully, but these errors were encountered:
Thanks so much for reporting this @jpwarren. This is a good reminder that (per #15), we need to be testing all the examples in CI. I've been doing spot checks of one or two examples periodically, but clearly I missed this one.
You were right about editing bundled/poll_loop.py, but the build.rs script that pulls it into the componentize-py binary wasn't smart enough to re-run when files under the bundled directory change, which I've just fixed. I've also fixed the example and tested all the other examples: #83
Attempting an example for the first time, and it looks like there's a typo in the example code.
I run
componentize-py -d ../../wit -w wasi:http/[email protected] componentize app -o http.wasm
and get this traceback:It looks like
bundled/poll_loop.py
does indeed try to import and useStreamErrorClosed
instead ofStreamError_Closed
, but when I try to make the change locally (so I can maybe file a PR), it doesn't appear to fix the error.I clearly don't understand how Python imports work with wasmtime and/or componentize-py. What am I missing? Is it pulling in the import from another path or a prebuilt module somewhere?
No rush, just wanted to start learning about wasm and coming from my background with Python seemed a reasonable entry point.
The text was updated successfully, but these errors were encountered: