spinframework / spinframework/spin-python-sdk

No module named `zlib`

Open
#24 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
48
Forks
15
Avg merge
2d 23h
Merged PRs (30d)
1

Description

I think zlib is part of the standard library — https://docs.python.org/3/library/zlib.html.

thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: ModuleNotFoundError: No module named 'zlib'', crates/spin-python-engine/src/lib.rs:385:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: the `wizer.initialize` function trapped

Caused by:
    wasm trap: wasm `unreachable` instruction executed
    wasm backtrace:
        0: 0x33f727 - <unknown>!__rust_start_panic
    note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable to may show more debugging information
    
Error: Couldn't create wasm from input

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at crates/spin-python-engine/src/lib.rs:385 and reproduce the failure during wizer.initialize with an import of Python's zlib module. Trace how the Python standard library is made available to the WASM runtime and identify why zlib is missing. Done means the wasm is created successfully when zlib is imported, without the panic shown here.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, rust, wasm
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.