Python 3.x 蟒蛇名录<;字符串>;无法转换类型

Python 3.x 蟒蛇名录<;字符串>;无法转换类型,python-3.x,python.net,Python 3.x,Python.net,我将.dll与python一起使用,以便向运动控制器发送命令。大多数请求都可以,但我在尝试以下操作时遇到了困难: 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_strin

我将.dll与python一起使用,以便向运动控制器发送命令。大多数请求都可以,但我在尝试以下操作时遇到了困难:

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
来自System.Collections.Generic导入列表
从系统导入字符串
结果,响应列表,错误字符串=SMC.ZT(1,列表[字符串],“”)
#错误:
结果,list_参数,err_string=self.SMC.ZT(ctlr_地址,list[string],err_string)
System.ArgumentException:无法转换类型“System.Collections.Generic.List`1[System.String]&”中的类型对象“System.RuntimeType”。
到System.RuntimeType.TryChangeType(对象值、绑定器、CultureInfo区域性、布尔需要特殊广播)
到System.Reflection.MethodBase.CheckArguments(对象[]参数、绑定器绑定器、BindingFlags invokeAttr、CultureInfo区域性、签名sig)
到System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(对象对象对象、BindingFlags invokeAttr、绑定器、对象[]参数、CultureInfo区域性)
到System.Reflection.RuntimeMethodInfo.Invoke(对象obj、BindingFlags invokeAttr、绑定器绑定器、对象[]参数、CultureInfo区域性)
调用(IntPtr inst、IntPtr args、IntPtr kw、MethodBase info、MethodInfo[]MethodInfo)
#文档中的语法:
#int ZT(int控制器地址、输出列表参数、输出字符串错误字符串)
#控制器地址:控制器地址
#参数:参数
#errString:失败原因
#返回:成功时为0,失败时为-1