bytecodealliance / bytecodealliance/componentize-py
ModuleNotFoundError error
- Langage dominant
- Rust
- Étoiles
- 277
- Forks
- 51
- Merge moyen
- 12 h 10 min
- PR mergées (30 j)
- 10
Description
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?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Reproduisez la commande avec plugin.py et wit/floria-plugins.wit, puis inspectez les bindings générés et le chemin d’importation utilisé pour wit_world.exports. Suivez la raison pour laquelle componentize-py tente d’importer dispatch et vérifiez que la commande se termine sans ModuleNotFoundError et produit dist/plugin.wasm.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python, wasm
- Domaine
- tooling
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- Active
- Clarté
- Plutôt claire
- Accessibilité débutants
- 68/100