You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cannot get anymore int of enumerator class (alpha2) #1809
In v2.5.2 I'm able to get a C# Enumerator and get the int value. In alpha 2 it seems that the full enumerator class is returned but the int command is not working.
You mean enum, right? An Enumerator is a very different thing.
This issue should be fixed on the current master (if you have the .NET SDK installed, you can install it using pip install git+https://github.com/pythonnet/pythonnet, I'll cut it as rc1 this weekend (see #1661).
Thanks for the report, and feel free to reopen if this doesnot work for you :)
Hi @filmor I've checked and the problem is still there. now it's even worst because it is making crashing the debugger. the picture shows the expression evaluation of the enum and the int command that makes failing the debugger.
@filmor I've also done a deeper check and verified that my object has the int property. When I try to call explicitily I get the following error
Out[13]: <bound method 'int'>
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Python.Runtime.Runtime.PyLong_FromLongLong(Int64 value)
at Python.Runtime.PyInt..ctor(Int64 value)
at Python.Runtime.EnumOps`1.int(T value)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Python.Runtime.MethodBinder.Invoke(BorrowedReference inst, BorrowedReference args, BorrowedReference kw, MethodBase info, MethodBase[] methodinfo)
at Python.Runtime.MethodObject.Invoke(BorrowedReference target, BorrowedReference args, BorrowedReference kw, MethodBase info)
at Python.Runtime.MethodBinding.tp_call(BorrowedReference ob, BorrowedReference args, BorrowedReference kw)
Activity
filmor commentedon Jun 8, 2022
You mean
enum, right? AnEnumeratoris a very different thing.This issue should be fixed on the current master (if you have the .NET SDK installed, you can install it using
pip install git+https://github.com/pythonnet/pythonnet, I'll cut it asrc1this weekend (see #1661).Thanks for the report, and feel free to reopen if this doesnot work for you :)
maxcapodi78 commentedon Jun 8, 2022
Hi @filmor you are correct. Thank you. I'll test it asap
maxcapodi78 commentedon Jun 8, 2022
Hi @filmor I've checked and the problem is still there. now it's even worst because it is making crashing the debugger. the picture shows the expression evaluation of the enum and the int command that makes failing the debugger.

maxcapodi78 commentedon Jun 8, 2022
@filmor I cannot reopen the PR since you have to do it.
maxcapodi78 commentedon Jun 8, 2022
@filmor I've also done a deeper check and verified that my object has the int property. When I try to call explicitily I get the following error
Out[13]: <bound method 'int'>
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at Python.Runtime.Runtime.PyLong_FromLongLong(Int64 value)
at Python.Runtime.PyInt..ctor(Int64 value)
at Python.Runtime.EnumOps`1.int(T value)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Python.Runtime.MethodBinder.Invoke(BorrowedReference inst, BorrowedReference args, BorrowedReference kw, MethodBase info, MethodBase[] methodinfo)
at Python.Runtime.MethodObject.Invoke(BorrowedReference target, BorrowedReference args, BorrowedReference kw, MethodBase info)
at Python.Runtime.MethodBinding.tp_call(BorrowedReference ob, BorrowedReference args, BorrowedReference kw)
Process finished with exit code -532462766
maxcapodi78 commentedon Jun 8, 2022
I've created another issue. We can keep this one closed