- Notifications
You must be signed in to change notification settings - Fork749
Fixed__cause__
on overload bind failure and array conversion#1442
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
As there are probably a few more places like this, shouldn't we add a convenience |
lostmsu commentedApr 13, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@filmor I do not think it is justified at this moment: with just these two places I don't get any more related assertion failures of that nature with debug builds of Python throughout out test suite. |
@@ -926,7 +926,9 @@ internal virtual IntPtr Invoke(IntPtr inst, IntPtr args, IntPtr kw, MethodBase i | |||
} | |||
value.Append(": "); | |||
Runtime.PyErr_Fetch(out var errType, out var errVal, out var errTrace); |
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.
This might also be a fix for#1371
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.
It might let us reenable the test case, but the issue that caused it will still be there.
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.
LGTM. However this is something easy to miss. It'd be great if we had pythonnet in debug (without Py_Debug) be able to detect known cases.
also: added debug check
What does this implement/fix? Explain your changes.
Calls to
PyObject_Str
andPyObject_Repr
should not be made with error set, as they may clear it. When using debug build of Python, this causes an assertion at runtime, preventing use of Python.NET.Does this close any currently open issues?
Partial fix for#1412