bytecodealliance / bytecodealliance/componentize-py

ModuleNotFoundError error

Đang mở
#217 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
277
Fork
51
Merge trung bình
12 giờ 10 phút
Pull request đã merge (30 ngày)
10

Mô tả

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?

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Tái hiện lệnh với plugin.py và wit/floria-plugins.wit, sau đó kiểm tra các bindings được tạo ra và đường dẫn import được sử dụng cho wit_world.exports. Truy vết lý do componentize-py cố gắng import dispatch và xác minh rằng lệnh hoàn tất mà không có ModuleNotFoundError và tạo ra dist/plugin.wasm.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python, wasm
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
68/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.