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 "Internal error ... local variable 'errstr' referenced before assignment during BoundFunction(...)" #5952
Conversation
…ignment during BoundFunction(...)"
@jalsti thanks for submitting this, I have queued it for review. |
@jalsti could you potentially add the code and configuration you used to trigger it? Maybe that can form the basis of a test? |
Minimal example would be to set developer mode, start ipython:
and use following snippet, which triggers the problem here (with Numba
(Normally the parameter going into the function was here an RGB image as Numpy array, but the above seems enough to trigger the problem.) |
As title
Thanks for the example. I've made this into a test here: stuartarchibald@3523ea5, I think with this applied, the above patch can be accepted as it demonstrably fixes the issue. Many thanks for reporting this and for supplying a fix! |
Thank you very much. |
As title
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.
I tried this locally, and can confirm the tests to check that the patch fixes the bug, it LGTM.
Thanks @esc |
In cc673c1 a change had been introduced in
numba/core/types/functions.py:399
which includes two problems that can occur (only) whenconfig.DEVELOPER_MODE
is active:errstr
variable before assignment_bt_as_lines(bt)
This pull request fixes both problems.