bytecodealliance / bytecodealliance/componentize-py
ModuleNotFoundError error
- 主要言語
- Rust
- スター
- 277
- フォーク
- 51
- 平均マージ
- 12時間 10分
- マージ済み PR(30日)
- 10
説明
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?
コントリビューションガイド
調査の方向性
plugin.py と wit/floria-plugins.wit を使ってコマンドを再現し、その後、生成された bindings と wit_world.exports に使用されているインポートパスを調べます。componentize-py が dispatch のインポートを試みる理由を追跡し、コマンドが ModuleNotFoundError なしで完了して dist/plugin.wasm を生成することを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python, wasm
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 68/100