Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading components as .wasm files fails #245

Open
wamli opened this issue Jul 8, 2024 · 0 comments
Open

Loading components as .wasm files fails #245

wamli opened this issue Jul 8, 2024 · 0 comments

Comments

@wamli
Copy link

wamli commented Jul 8, 2024

Even though having successfully repeated this example to load a component, my observation is that components in form of *.wasm are not loaded but yield the following error instead:

$ python -m load_demo.py 
Traceback (most recent call last):
  File "/load_demo.py", line 3, in <module>
    import demo_component
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "lib/python3.11/site-packages/wasmtime/loader.py", line 80, in exec_module
    exec(component_files[relative_path], module.__dict__)
  File "<string>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "lib/python3.11/site-packages/wasmtime/loader.py", line 80, in exec_module
    exec(component_files[relative_path], module.__dict__)
         ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'imports.py'
  1. See this public repo with an example that may easily be repeated
  2. See this post in Zulip as initial discussion.
@wamli wamli changed the title Loading components Loading components as .wasm files fails Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant