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
Unable to cast object of type 'System.Data.DataRow' to type 'System.IConvertible'.Couldn't store <System.Data.DataRow> in Id Column. Expected type is Int32.
at System.Data.DataColumn.set_Item(Int32 record, Object value)
at System.Data.DataTable.NewRecordFromArray(Object[] value)
at System.Data.DataRowCollection.Add(Object[] values)
I could fix this issue in local repo by patching Python.Runtime.MethodBinder.GetPrecedence method, I set lower precedence to overloaded methods with Params array parameter
Please have a look and let me know your suggestions
-Parthasarathy K
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
Environment
Details
In PythonNet 2.5.1, I found correct/appropriate overloaded .Net methods are not invoked from Python while executing .Net code statements
for example please find the below code throws an error while trying to execute System.Data.DataRowCollection.Add(System.Data.DataRow) method.
Reference: https://docs.microsoft.com/en-us/dotnet/api/system.data.datarowcollection.add?view=netframework-4.8
Code:
params_overloaded_function_precedence_issue.py.txt
Unable to cast object of type 'System.Data.DataRow' to type 'System.IConvertible'.Couldn't store <System.Data.DataRow> in Id Column. Expected type is Int32.
at System.Data.DataColumn.set_Item(Int32 record, Object value)
at System.Data.DataTable.NewRecordFromArray(Object[] value)
at System.Data.DataRowCollection.Add(Object[] values)
I could fix this issue in local repo by patching Python.Runtime.MethodBinder.GetPrecedence method, I set lower precedence to overloaded methods with Params array parameter
Please have a look and let me know your suggestions
-Parthasarathy K
The text was updated successfully, but these errors were encountered: