Python int error

Trying to convert doubles to integers using another list of strings.

I’m getting this error:

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 16, in
TypeError: Multiple targets could match: int(type, IList[Byte]), int(type, object), int(type, Extensible[float])

import sys
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# The inputs to this node will be stored as a list in the IN variables.
typeInput = IN[0]
valueInput = IN[1]

valueOut = []

# Place your code below this line
for i in range(len(typeInput)):
    if typeInput[i] == "Integer":
        valueOut.append(int(valueInput[i]))
    else:
        valueOut.append(valueInput[i])


# Assign your output to the OUT variable.
OUT = valueOut

@crapai it is working from my side:

2 Likes

Thanks, I’ll try looking at my inputs.

1 Like

Looks like I have some nulls as values that I wasn’t expecting. Parameters probably with no value added yet. I’ll add something to check for null and replace it with 0.

Thanks