labview 调用python程序时报错

已经成功调用了python封装的函数,当把数组传给python时就报错

img

img

--------------------------这是python程序

def add3(listweight):
    print('料斗重量为:{}'.format(listweight))
    结果 = 0
    C0 = 0
    C1 = 0
    index = 0
    listtemp2 = []
    listtemp1 = []
    weightgroup = []
    for i1 in range (0,11):
        listtemp =[listweight[0],listweight[1],listweight[2],listweight[3],
        listweight[4],listweight[5],listweight[6],listweight[7],
        listweight[8],listweight[9],listweight[10],listweight[11]]#直接赋值列表会指向同一内存地址,
        #导致被列表值被清空,所以使用常量的方式赋值
        list_pop = listtemp.pop(i1)
        for i2 in range (0,10):
            C0 += 1
            结果 = list_pop+listtemp[i2]+listtemp[i2+1]
            if 结果 >= 98 and 结果 <= 101:
                C1 += 1
                temp = [list_pop,listtemp[i2],listtemp[i2+1]]
                weightgroup.append(temp)
                print ('\n-------------------\n当前循环第{}次\n结果为{}\n当前为第{}次配合\n和 = {}+{}+{}\n-------------------'\
                    .format(C0,结果,C1,list_pop,listtemp[i2],listtemp[i2+1])) 
    if C1 == 0:
        print('以3组为适配未找到结果')
        for i1 in range (0,11):
            listtemp =[listweight[0],listweight[1],listweight[2],listweight[3],
            listweight[4],listweight[5],listweight[6],listweight[7],
            listweight[8],listweight[9],listweight[10],listweight[11]] 
            #导致被列表值被清空,所以使用常量的方式赋值
            list_pop = listtemp.pop(i1)
            for i2 in range (0,9):
                C0 += 1
                结果 = list_pop+listtemp[i2]+listtemp[i2+1]+listtemp[i2+2]
                if 结果 >= 98 and 结果 <= 101:
                    C1 += 1
                    temp = [list_pop,listtemp[i2],listtemp[i2+1],listtemp[i2+2]]
                    weightgroup.append(temp)
                    print ('\n-------------------\n当前循环第{}次\n结果为{}\n当前为第{}次配合\n和 = {}+{}+{}+{}\n-------------------'\
                        .format(C0,结果,C1,list_pop,listtemp[i2],listtemp[i2+1],listtemp[i2+2]))
    if C1 == 0:
        print('以4组为适配未找到结果')
    return weightgroup

错误信息很明确啊,他需要一个整型,你给他传了一个列表(就是数组)