Repository navigation
cannot get anymore int of enumerator class (alpha2) #1809
Description
Activity
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 :)
Hi @filmor you are correct. Thank you. I'll test it asap
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 cannot reopen the PR since you have to do it.
@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
I've created another issue. We can keep this one closed
Environment
Details
Describe what you were trying to get done.
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.
What commands did you run to trigger this issue? If you can provide a
Minimal, Complete, and Verifiable example
this will help us understand the issue.