You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "alanhdu (via GitHub)" <gi...@apache.org> on 2023/08/14 19:59:47 UTC
[GitHub] [arrow] alanhdu opened a new issue, #37164: Attach Python stacktrace to errors in `ConvertPyError`
alanhdu opened a new issue, #37164:
URL: https://github.com/apache/arrow/issues/37164
### Describe the bug, including details regarding any error messages, version, and platform.
We have an internal application that is using the `arrow::RecordBatchReader` with a Python generator (but in C++). Right now, when the Python generator raises an error, the stack trace disappears (e.g. in our code base we just see:
```
Python exception: AssertionError
```
without the stack trace.
I am not super familiar with C++ or the code, but I *think* the problem can be traced to this function:
https://github.com/apache/arrow/blob/750670e8c7c8b7985323f7866e4aa09be4232169/python/pyarrow/src/arrow/python/common.cc#L144-L153
which calls into
https://github.com/apache/arrow/blob/750670e8c7c8b7985323f7866e4aa09be4232169/python/pyarrow/src/arrow/python/common.cc#L91-L96
where we *only* attach the exception type name and no other information. My C++ is not very good, but how hard would it be to actually attach the full Python stacktrace inside the message whenever we hit a Python exception?
### Component(s)
Python
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] pitrou commented on issue #37164: Attach Python stacktrace to errors in `ConvertPyError`
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #37164:
URL: https://github.com/apache/arrow/issues/37164#issuecomment-1688558995
Yes, we could improve `PythonErrorDetail::ToString()` to include more information (the downside is that it would also be more noisy for the user, who might not be interested in a full traceback).
cc @danepitkin
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] Attach Python stacktrace to errors in `ConvertPyError` [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #37164: [Python] Attach Python stacktrace to errors in `ConvertPyError`
URL: https://github.com/apache/arrow/issues/37164
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org