I am using a .dll with python in order to send commands to a motion controller. The majority of requests are OK but I'm facing difficulties when trying the following:
from System.Collections.Generic import List
from System import String
result, response_list, err_string = SMC.ZT(1, List[String], "")
# The Error:
result, list_parameters, err_string = self.SMC.ZT(ctlr_address, List[String], err_string)
System.ArgumentException: Unable to convert type object 'System.RuntimeType' in type 'System.Collections.Generic.List`1[System.String]&'.
to System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)
to System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)
to System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
to System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
to Python.Runtime.MethodBinder.Invoke(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, MethodInfo[] methodinfo)
# Syntax from the docs:
# int ZT(int controllerAddress, out List<string> Parameters, out string errstring)
# controllerAddress: controllerAddress
# Parameters: Parameters
# errString: The failure reason
# return: 0 in success and -1 on failure