ModuleNotFoundError error

オープン
#217 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, wasm
領域
tooling

調査の方向性

plugin.py と wit/floria-plugins.wit を使ってコマンドを再現し、その後、生成された bindings と wit_world.exports に使用されているインポートパスを調べます。componentize-py が dispatch のインポートを試みる理由を追跡し、コマンドが ModuleNotFoundError なしで完了して dist/plugin.wasm を生成することを確認します。

索引モデルが issue の本文から書いたものです。

説明

I am using this wit file and am trying this simple example (plugin.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:

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 <module>
    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?

主要言語
Rust
スター
284
フォーク
56
平均マージ
2日 4時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

bytecodealliance/componentize-py のほかの issue

bytecodealliance/componentize-py の issue をすべて見る

似ている issue

Rust の issue をもっと見る

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

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