bytecodealliance / bytecodealliance/componentize-py
ModuleNotFoundError error
- Vorherrschende Sprache
- Rust
- Sterne
- 277
- Forks
- 51
- Ø Merge
- 12 Std. 10 Min.
- Gemergte PRs (30 T.)
- 10
Beschreibung
I am using [this wit file](https://codeberg.org/tliron/floria/src/branch/main/library/assets/wit/floria-plugins.wit) and am trying this simple example (`plugin.py`):
```py
import wit_world
import wit_world.exports
class Dispatch(wit_world.exports.Dispatch):
def initialize(self, id):
pass
def dispatch(self, name, arguments, call_site):
pass
```
My command is basically this:
```sh
componentize-py \
--wit-path wit/floria-plugins.wit \
componentize \
--stub-wasi \
--python-path plugin \
--output dist/plugin.wasm \
plugin
```
The error is this:
```
Traceback (most recent call last):
File "python/bin/componentize-py", line 6, in
sys.exit(script())
~~~~~~^^
AssertionError: ModuleNotFoundError: No module named 'dispatch'
Caused by:
ModuleNotFoundError: No module named 'dispatch'
```
I tried generating the bindings and can't find anything that would cause this error. Am I doing something wrong?
Beitragsleitfaden
Rechercherichtung
Reproduce the command with plugin.py and wit/floria-plugins.wit, then inspect the generated bindings and the import path used for wit_world.exports. Trace why componentize-py attempts to import dispatch and verify the command completes without ModuleNotFoundError and produces dist/plugin.wasm.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python, wasm
- Bereich
- tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 68/100