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
$ componentize-py --wit-path add.wit --world example componentize example -o add.wasm
Traceback (most recent call last):
File "/opt/homebrew/bin/componentize-py", line 8, in<module>sys.exit(script())
^^^^^^^^
AssertionError:
Caused by:
TypeError: Can't instantiate abstract class Example without an implementation for abstract method 'add'
Now when i go to componentize I get the TypeError:
$ componentize-py --wit-path /path/to/examples/example-host/add.wit --world example componentize example -o add.wasm
Traceback (most recent call last):
...
Workaround
@dicej pointed out that the issue is that you cannot name the Python module (example.py) the same as the world name (example), since componentize-py will generate a module using the world name and only use one of them. Renaming example.py to app.py resolved the issue.
The error thrown should be more descriptive and actionable. It was not clear from the TypeError how to resolve the issue.
The text was updated successfully, but these errors were encountered:
Error
I ran into the following error:
Repro
My set up was the following:
App:
Now when i go to componentize I get the
TypeError
:Workaround
@dicej pointed out that the issue is that you cannot name the Python module (
example.py
) the same as the world name (example
), sincecomponentize-py
will generate a module using the world name and only use one of them. Renamingexample.py
toapp.py
resolved the issue.The error thrown should be more descriptive and actionable. It was not clear from the
TypeError
how to resolve the issue.The text was updated successfully, but these errors were encountered: