Skip to content

Exception Example Triggers Host Panic in extism-py 0.1.4 #52

Description

@bradyjoslin

I'm encountering a panic when running the example from the readme using version 0.1.4.

Running the documented example:

import extism

@extism.plugin_fn
def greet():
  name = extism.input_str()
  if name == "Benjamin":
    raise Exception("Sorry, we don't greet Benjamins!")
  extism.output_str(f"Hello, {name}")

...results in a panic when called from the host:

$ extism call plugin.wasm greet --input="Benjamin" --wasi
thread '<unnamed>' panicked at src/lib.rs:58:6:
called `Result::unwrap()` on an `Err` value: PyErr { type: <class 'Exception'>, value: Exception("Sorry, we don't greet Benjamins!"), traceback: Some(<traceback object at...
...

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions