try/except in objmode fails with NameError
See original GitHub issueReporting a bug
- I have tried using the ~latest released~ mainline version of Numba (most recent is visible in the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
- I have included below a minimal working reproducer (if you are unsure how to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).
This
from numba import jit
@jit(forceobj=True)
def foo():
try:
pass
except:
pass
foo()
fails with:
NameError: global name 'mark_try_block' is not defined
works fine in nopython
mode.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
numba/numba - Gitter
Hi everybody, I have a piece of code written using numba but its throwing me an error. Was wondering if I could get...
Read more >python - NameError, global not defined when using try,except
When I run this code I get the error. except NoSuchObject as objectname: NameError: global name 'NoSuchObject' is not defined.
Read more >8. Errors and Exceptions — Python 3.11.1 documentation
There are (at least) two distinguishable kinds of errors: syntax error... ... the types in the example are ZeroDivisionError , NameError and TypeError...
Read more >NameError Exception in Python
Learn to handle Name Error exception in python using the try-except block.
Read more >NameError: Name plot_cases_simple is Not Defined
You'll see what a NameError is, some code examples to show how/why the error occurs, and how to fix them. What Is a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The code path to get to this point is different. Fixing one would hopefully fix the other, but not guaranteed.
@guilhermeleobas I’ve assigned you the issue 😃