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
Describe what you were trying to get done.
I was exploring pythonnet inside Python REPL (by the way it's a very amazing library!) and I tried to use T[].Address(int), but when I called Address using wrong arguments, it crashes the interpreter instead of throwing an exception.
The same thing happens when trying to use T[].Get and T[].Set.
>>># runtime being loaded and array created the same way as first example>>>array.A# press TAB here
If there was a crash, please include the traceback here.
Unhandledexception. System.ArgumentNullException: Value cannot be null.(Parameter 'key')
at System.Collections.Generic.Dictionary`2.FindValue(TKeykey)
at System.Collections.Generic.Dictionary`2.ContainsKey(TKeykey)
at Python.Runtime.MethodBinder.MatchesArgumentCount(Int32positionalArgumentCount,ParameterInfo[]parameters, Dictionary`2kwargDict,Boolean¶msArray,ArrayList&defaultArgList,Int32&kwargsMatched,Int32&defaultsNeeded)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/MethodBinder.cs:line 775
at Python.Runtime.MethodBinder.Bind(BorrowedReferenceinst,BorrowedReferenceargs, Dictionary`2kwargDict,MethodBase[]methods,BooleanmatchGenerics)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/MethodBinder.cs:line 392
at Python.Runtime.MethodBinder.Bind(BorrowedReferenceinst,BorrowedReferenceargs,BorrowedReferencekw,MethodBaseinfo,MethodBase[]methodinfo)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/MethodBinder.cs:line 366
at Python.Runtime.MethodBinder.Invoke(BorrowedReferenceinst,BorrowedReferenceargs,BorrowedReferencekw,MethodBaseinfo,MethodBase[]methodinfo)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/MethodBinder.cs:line 868
at Python.Runtime.MethodObject.Invoke(BorrowedReferencetarget,BorrowedReferenceargs,BorrowedReferencekw,MethodBaseinfo)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/Types/MethodObject.cs:line 77
at Python.Runtime.MethodBinding.tp_call(BorrowedReferenceob,BorrowedReferenceargs,BorrowedReferencekw)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/Types/MethodBinding.cs:line 166
Aborted
Unhandledexception. Python.Runtime.PythonException: name must be a str,not a NoneType
File "/usr/lib/python3.11/inspect.py",line2701,in __init__
raiseTypeError(msg)
at Python.Runtime.PythonException.ThrowLastAsClrException()in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/PythonException.cs:line 53
at Python.Runtime.PyObject.Invoke(PyTupleargs,PyDictkw)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/PythonTypes/PyObject.cs:line 801
at Python.Runtime.MethodBinding.get_Signature()in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/Types/MethodBinding.cs:line 103
at Python.Runtime.MethodBinding.tp_getattro(BorrowedReferenceob,BorrowedReferencekey)in/tmp/build-via-sdist-zkttv147/pythonnet-3.0.2/src/runtime/Types/MethodBinding.cs:line 147
Environment
3.0.2 from pip
Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Debian GNU/Linux 12 (bookworm); Linux localhost 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-1 (2023-07-14) x86_64 unknown unknown linux
8.0.100-preview.3.23178.7 [/home/jorge/.dotnet/sdk]
Details
Describe what you were trying to get done.
I was exploring pythonnet inside Python REPL (by the way it's a very amazing library!) and I tried to use
T[].Address(int)
, but when I called Address using wrong arguments, it crashes the interpreter instead of throwing an exception.The same thing happens when trying to use
T[].Get
andT[].Set
.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.
Address
,Get
andSet
are documented here: https://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20II.pdf.The text was updated successfully, but these errors were encountered: