🐛 Bug
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
import js
js.fetch('http://karay.me/truepyxel/test.json').then(lambda resp: resp.json()).then(lambda data: data.msg).catch(lambda err: 'there were error: '+err.message)
Environment
- Pyodide Version: 0.20
- Browser version: 103.0.5060.134
🐛 Bug
If I understand correctly, starting with version 0.17, Pyodide integrates the implementation of
awaitfor JsProxy. So when JS returns aPromise, it converts it toFuturein Python, which allows us to useawait.Hoverer, the
Futureobject has no attributethen, so it is no longer possible to buildthen/catchchains like in older versions.To Reproduce
Environment