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
ModuleNotFoundError when trying to build examples #259
I was trying to follow the guidance in README.md to create a simple wasm file, without success. I tried with one of the examples and got the same error so I am thinking there is something wrong apart from me.
Cloned the this repo (main branch, commit f6710d6)
cd to examples/cli
run componentize-py -d ../../wit -w wasi:cli/command@0.2.0 componentize app -o cli.wasm as stated in the README
I get
Traceback (most recent call last):
File "<frozen runpy>", line 201, in _run_module_as_main
File "<frozen runpy>", line 87, in _run_code
File "C:\.venv\Scripts\componentize-py.exe\__main__.py", line 5, in <module>
sys.exit(script())
~~~~~~^^
AssertionError: Traceback (most recent call last):
File "/0/app.py", line 1, in <module>
from wit.exports.wasi.cli_v0_2 import run, Run
ModuleNotFoundError: No module named 'wit'
Caused by:
ModuleNotFoundError: No module named 'wit'
Using windows 11 (x86_64)
Python 3.15.2
componentize-py 0.25.1
I am aware that the naming of modules etc. has been changed quite recently.
Thanks for reporting this, @pedro-w. Yeah, there are a number of significant, incompatible changes on the main branch of this repo vs. the most recent published release, hence this issue.
To work around that, you can either:
git checkout v0.25.1 to get the matching Git commit for the published release,
build componentize-py from source on the main branch (see CONTRIBUTING.md for instructions) and use that, or
wait for the next release to be published (I'm planning to do that in the next week or so)
The proper fix for this is probably to update the instructions in the main README.md and the ones in the examples to either not require any git clone at all (ideally) or specify the tag to check out (less ideally). The former option would involve publishing the required WIT interfaces to a registry that's included in componentize-py's default registry config. The foundational work for that was done in #250; the next step is to publish any non-standard WIT files required by the examples.
Activity
dicej commentedon Nov 30, 2026
Thanks for reporting this, @pedro-w. Yeah, there are a number of significant, incompatible changes on the
mainbranch of this repo vs. the most recent published release, hence this issue.To work around that, you can either:
git checkout v0.25.1to get the matching Git commit for the published release,componentize-pyfrom source on themainbranch (see CONTRIBUTING.md for instructions) and use that, orThe proper fix for this is probably to update the instructions in the main
README.mdand the ones in the examples to either not require anygit cloneat all (ideally) or specify the tag to check out (less ideally). The former option would involve publishing the required WIT interfaces to a registry that's included incomponentize-py's default registry config. The foundational work for that was done in #250; the next step is to publish any non-standard WIT files required by the examples.