How to fix TypeError: Unable to covert row 1, column 1 to type class java.lang.Integer

my code is want to get a new dataset, but on the line systme.tag.writeblocking line ,it said the type error, could you please help fix it ? thanks

pressurecycles=[]
i=0
for i in range(0,len(pressure_range)):
     pressurecycles.append([pressure_range[i],Sum_w[i],stressrange[i],N[i],D[i],CumD[i]])
 system.tag.writeBlocking("[default]pressurecycles",system.dataset.toDataSet(['P','n','stressrange','N','D','CumD'],pressurecycles))
````Preformatted text`

I tried to fix your script (by enclosing in triple backticks ```) but the formatting is still mangled.

The error you’re getting indicates that the value of pressure_range[1] is not the same type (integer) as pressure_range[0].

1 Like

I think column 1 is the Sum_w[i] values. Either way, I’d say you likely have a mix of integers and floats in your lists.

1 Like