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
If I understand correctly, starting with version 0.17, Pyodide integrates the implementation of await for JsProxy. So when JS returns a Promise, it converts it to Future in Python, which allows us to use await.
Hoverer, the Future object has no attribute then, so it is no longer possible to build then/catch chains like in older versions.
To Reproduce
importjsjs.fetch('http://karay.me/truepyxel/test.json').then(lambdaresp: resp.json()).then(lambdadata: data.msg).catch(lambdaerr: 'there were error: '+err.message)
Environment
Pyodide Version: 0.20
Browser version: 103.0.5060.134
The text was updated successfully, but these errors were encountered:
🐛 Bug
If I understand correctly, starting with version 0.17, Pyodide integrates the implementation of
await
for JsProxy. So when JS returns aPromise
, it converts it toFuture
in Python, which allows us to useawait
.Hoverer, the
Future
object has no attributethen
, so it is no longer possible to buildthen
/catch
chains like in older versions.To Reproduce
Environment
The text was updated successfully, but these errors were encountered: