-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix JsException passing from pyodide environment to host #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @koenvo! It looks good to me.
I noticed some tests were failing. Hope all run correctly now. |
Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @koenvo . LGTM as well.
note: maybe a more generic way of passing exceptions from pyodide environment to host is better? cloudpickle might do the trick.
Indeed that's a good question. We could consider switching to cloudpickle if we run into other frequent pickling issues.
Could you please just add a changelog.md entry? |
…to fix-jsexception
for more information, see https://pre-commit.ci
Not sure what's going on with that test, but it's failing quite frequently (unrelated to this PR). |
It seems like safaridriver is a bit unstable. Probably we can disable a test using |
When a JsException exception is raised the pyodide environment pickles the exception and send it back to the host. The host tries to unpickle it and fails. This happens because
pyodide.JsException
does not exist.This PR solves this issue by interception during unpickling.
note: maybe a more generic way of passing exceptions from pyodide environment to host is better? cloudpickle might do the trick.