bytecodealliance / bytecodealliance/componentize-py

ModuleNotFoundError error

オープン
#217 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。