You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$> /usr/local/opt/[email protected]/bin/python3.10 ./test.py
Traceback (most recent call last):
File "/usr/local/sfomuseum/go-edtf/./test.py", line 35, in <module>
instance.exports.parse(input_pointer)
RuntimeError: RuntimeError: Parameters of type [I32] did not match signature [I32, I32, I32] -> []
Which I understand in principle but I am not sure I understand what is triggering it or why since it does not match the signature of the parse method in Go:
Summary
I want to use a WASI binary produced by TinyGo (0.26.0) in Python capturing the output from an exported function to a variable.
Specifically the
parse
method defined here:https://github.com/sfomuseum/go-edtf/blob/wasi/cmd/parse-wasi/main.go
Which I can build and test like this:
If I run the following Python code (in a file called
test.py
):I get this:
However, it's not clear how I can capture that output to a variable. Swapping out
sys.stdout
(orstderr
) to aStringIO
instance doesn't seem to work.If I modify the code to pass an input pointer to
instance.exports.parse
like this:I get the following error:
Which I understand in principle but I am not sure I understand what is triggering it or why since it does not match the signature of the
parse
method in Go:https://github.com/sfomuseum/go-edtf/blob/wasi/cmd/parse-wasi/main.go#L34
I feel like maybe I missing something obvious but I can't figure out what.
The text was updated successfully, but these errors were encountered: