ModuleNotFoundError when trying to build examples

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

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

評価

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

調査の方向性

The failure comes from the componentize-py CLI when building examples/cli, where the generated bindings module wit cannot be imported by the app. Start with the README steps and the bindings generation path in the Rust/Python tooling, then reproduce by running the README command from examples/cli. Done means the example builds to cli.wasm without the ModuleNotFoundError, on Windows as well as other platforms.

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

説明

I was trying to follow the guidance in README.md to create a simple wasm file, without success. I tried with one of the examples and got the same error so I am thinking there is something wrong apart from me.

  1. Cloned the this repo (main branch, commit f6710d6d53f91f914e106011c72730f78cbc433a)
  2. cd to examples/cli
  3. run componentize-py -d ../../wit -w wasi:cli/[email protected] componentize app -o cli.wasm as stated in the README

I get

Traceback (most recent call last):
  File "<frozen runpy>", line 201, in _run_module_as_main
  File "<frozen runpy>", line 87, in _run_code
  File "C:\.venv\Scripts\componentize-py.exe\__main__.py", line 5, in <module>
    sys.exit(script())
             ~~~~~~^^
AssertionError: Traceback (most recent call last):
  File "/0/app.py", line 1, in <module>
    from wit.exports.wasi.cli_v0_2 import run, Run
ModuleNotFoundError: No module named 'wit'


Caused by:
    ModuleNotFoundError: No module named 'wit'
  • Using windows 11 (x86_64)
  • Python 3.15.2
  • componentize-py 0.25.1

I am aware that the naming of modules etc. has been changed quite recently.

主要言語
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 を短くまとめたダイジェスト。