Skip to content
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

TST: Can't pickle pyodide.InternalError #83

Closed
rth opened this issue Apr 4, 2023 · 1 comment
Closed

TST: Can't pickle pyodide.InternalError #83

rth opened this issue Apr 4, 2023 · 1 comment

Comments

@rth
Copy link
Member

rth commented Apr 4, 2023

Now in #80 (that just updates linting) we start to see the issue about picklability of InternalError. I think this is likely related to changes in pyodide 0.23.0

@hoodmane for JsException that got subclassed into a Python Exception I guess we don't support for them to be picklable, while this tries to do it when passing errors between the runner and the host?

___________________________ test_hypothesis[firefox] ___________________________
pytest_pyodide/decorator.py:194: in test_hypothesis
    ???
pytest_pyodide/runner.py:212: in run_async
    return self.run_js(
pytest_pyodide/runner.py:249: in run_js
    return self.run_js_inner(code, check_code)
pytest_pyodide/runner.py:354: in run_js_inner
    raise JavascriptException(retval[1], retval[2])
E   pytest_pyodide.runner.JavascriptException: PythonError: Traceback (most recent call last):
E     File "<string>", line 104, in run_in_pyodide_main
E     File "/home/runner/work/pytest-pyodide/pytest-pyodide/tests/test_decorator.py", line 225, in test_hypothesis
E   pyodide.InternalError: Internal error occurred in compute_typeflags
E   
E   During handling of the above exception, another exception occurred:
E   
E   Traceback (most recent call last):
E     File "/lib/python3.10/asyncio/futures.py", line 201, in result
E       raise self._exception
E     File "/lib/python3.10/asyncio/tasks.py", line 232, in __step
E       result = coro.send(None)
E     File "<string>", line 116, in run_in_pyodide_main
E     File "<string>", line 75, in encode
E   _pickle.PicklingError: Can't pickle <class 'pyodide.InternalError'>: attribute lookup InternalError on pyodide failed
@rth
Copy link
Member Author

rth commented Apr 4, 2023

Opened twice in #82 due to bad network connection.

@rth rth closed this as completed Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant