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
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
AnyIO version
3.7.1
Python version
3.10.11
What happened?
When an exception is raised using to_process.run_sync, I expected to be able to access or view the original exception traceback somehow. Debugging is somewhat difficult without this feature.
This is supported in stdlib multiprocessing in a roundabout and hacky but effective way:
when the exception is unpickled in the main process it gets a secondary exception chained to it using __cause__ ... whose stringification contains the stringification of the original traceback.
agronholm
changed the title
to_process.run_sync() discards the stack trace when an exception is raised
Retrieve the stack trace from a worker process of to_process.run_sync() when an exception is raised
Aug 30, 2023
How is it going now? It would be a really helpful feature such if I use fastapi in an async funtion to run a cpu-indensive task but failed, with this feature I can get the reason.
Things to check first
I have searched the existing issues and didn't find my bug already reported there
I have checked that my bug is still present in the latest release
AnyIO version
3.7.1
Python version
3.10.11
What happened?
When an exception is raised using
to_process.run_sync
, I expected to be able to access or view the original exception traceback somehow. Debugging is somewhat difficult without this feature.This is supported in stdlib
multiprocessing
in a roundabout and hacky but effective way:How can we reproduce the bug?
I realize now that this might be as much a feature request as it is a bug. Please feel free to re-label as needed.
The text was updated successfully, but these errors were encountered: