-
Notifications
You must be signed in to change notification settings - Fork 160
BUG: pandas.DataFrame.index.map() works differently if debugpy debugger is attached #775
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
Comments
Do you mean that exception is reported? Exceptions that are caught can still be reported at the time they are raised; and if you have User Unhandled Exceptions checked in the Breakpoints pane, this will happen here, because the To suppress the report, just uncheck the aforementioned checkbox. We've already changed it to be false by default in debugpy 1.5.1, but I think it might preserve the checked state from previous versions in VSCode UI. |
You're probably right. I can continue running after breaking. But what confuses me is that if I run: try:
raise RuntimeError()
except:
print("Here!") it doesn't break on line 2. That's why I thought this was a crash. But in your comment I think you explain why this happens the first example but not the second. I believe this can be closed. |
That's because On your second case, the exception is raised and caught in user code, so, it's not shown with this setting (it'll only be shown if The solution is turning |
Environment data
Actual behavior
debugpy crashes where neither CPython 3.9 nor pdb does. It crashes at line 5 in the example below with the stack trace:
Expected behavior
It should print something similar to
Result: Int64Index([2031, 2032], dtype='int64', name='Date')
, which python3.9 and pdb does.Steps to reproduce:
By looking at the pandas source code it first tries running
map_func()
with the index as argument, and if it fails an exception is caught and it calls the same method with every single element. But with debugpy theexcept Exception:
is not caught for some reason. Frompandas/core/indexes/extension.py:374-389
:The text was updated successfully, but these errors were encountered: