-
-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Hello,
I am having issues with the newer versions of Pyodide not working nicely with stlite.
In Pyodide v0.29.0 there were the following breaking changes:
BREAKING CHANGE The default behavior of toJs()/to_js was changed to convert dictionaries to JavaScript objects. To opt into the old behavior, pass toJsLiteralMap: true to loadPyodide(). This is deprecated. #5912
BREAKING CHANGE Deprecated JsProxy.as_object_map(). It will be removed in Pyodide 0.31.0. Use JsProxy.as_js_json() instead. #5899
It seems to have affected the embedding of files:
Pyodide version v0.28.3 works, no issues.
Pyodide version v0.29.0 onwards does not load the image:
And has console errors:
worker-runtime.js:597 PythonError: Traceback (most recent call last):
File "/lib/python3.13/site-packages/stlite_lib/server/server.py", line 155, in receive_http_from_js
return self.receive_http(
~~~~~~~~~~~~~~~~~^
method=method,
^^^^^^^^^^^^^^
...<3 lines>...
on_response=on_response,
^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/lib/python3.13/site-packages/stlite_lib/server/server.py", line 226, in receive_http
on_response(status, res_headers, res_body)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "https://cdn.jsdelivr.net/npm/@stlite/browser@0.90.0/build/assets/worker-C8z-u6FM.js", line 621, in p
pyodide.ffi.JsException: TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
at new_error (pyodide.asm.js:8:578922)
at pyodide.asm.wasm:0x10f082
at pyodide.asm.wasm:0x10f14a
at callPyObjectKwargs (pyodide.asm.js:8:632930)
at Module.callPyObject (pyodide.asm.js:8:634076)
at Function.apply (pyodide.asm.js:8:650317)
at Object.apply (pyodide.asm.js:8:646745)
at a (worker-runtime.js:499:32)
a @ worker-runtime.js:597
v0290.html:1 Uncaught (in promise) Error: Traceback (most recent call last):
File "/lib/python3.13/site-packages/stlite_lib/server/server.py", line 155, in receive_http_from_js
return self.receive_http(
~~~~~~~~~~~~~~~~~^
method=method,
^^^^^^^^^^^^^^
...<3 lines>...
on_response=on_response,
^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/lib/python3.13/site-packages/stlite_lib/server/server.py", line 226, in receive_http
on_response(status, res_headers, res_body)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "https://cdn.jsdelivr.net/npm/@stlite/browser@0.90.0/build/assets/worker-C8z-u6FM.js", line 621, in p
pyodide.ffi.JsException: TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
at new_error (pyodide.asm.js:8:578922)
at pyodide.asm.wasm
at pyodide.asm.wasm
at callPyObjectKwargs (pyodide.asm.js:8:632930)
at Module.callPyObject (pyodide.asm.js:8:634076)
at Function.apply (pyodide.asm.js:8:650317)
at Object.apply (pyodide.asm.js:8:646745)
at a (worker-C8z-u6FM.js:633:13)
For now the "fix" is to use Pyodide versions prior to 0.29.0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels