Environment
- Pythonnet version: 2.3.0
- Python version: 3.6
- Operating System: Win 10 x64 1809
Details
I am trying to get Python call my C# method, which has a parameter of type object with an instance of Python's KeyError.
var o = overloaded.ToPython();
dynamic callWithSelf = PythonEngine.Eval("lambda o: o.ObjOrClass(KeyError())");
callWithSelf(o);
Where ObjOrClass definition is: public void ObjOrClass(object _) => this.Value = Object;. The actual function body here is not important.
Python.Runtime.PythonException : TypeError : No method matches given arguments for ObjOrClass
Possibly related:
#265
#782
Thoughs
IMHO, Python.NET should create a PyObject and pass it here.