TypeError: Unable to convert row x, column y to type class

Using the following data, why am I getting the error that follows it?

header:
[ul][‘id’, ‘flags’, ‘group’, ‘displayname’, ‘devicename’, ‘lastpolltime’, ‘lastpolltime_alm’, ‘ap’, ‘ap_alm’, ‘tf’, ‘tf_alm’, ‘dp’, ‘dp_alm’, ‘flow’, ‘flow_alm’, ‘gas’, ‘gas_state’, ‘gas1’, ‘gas1_state’, ‘gas2’, ‘gas2_state’, ‘gas3’, ‘gas3_state’, ‘gas4’, ‘gas4_state’, ‘gas5’, ‘gas5_state’, ‘status’][/ul]

data:
[ul][-1, 0, ‘Inlet’, ‘’, ‘’, ‘’, 3, None, 3, None, 3, None, 3, None, 3, None, 3, None, 3, None, 3, None, 3, None, 3, None, 3, 2]
[1582, 0, ‘’, ‘718FW 01’, ‘718FW081’, ‘7/6/2012 2:20:58 PM’, 0, 63.0, 0, 111.0, 0, 2.0, 0, 33.0, 0, 42.0, 0, 42.0, 0, 42.0, 0, None, 0, 40.0, 0, 40.0, 0, 0]
[1583, 0, ‘’, ‘718FW 02C’, ‘718FW083’, ‘7/6/2012 2:21:19 PM’, 0, 64.0, 0, 119.0, 0, 0.0, 1, 0.0, 1, 1.0, 0, 1.0, 0, 3.0, 0, None, 0, 3.0, 0, 4.0, 0, 0]
[1584, 0, ‘’, ‘718FW 04’, ‘718FW084’, ‘7/6/2012 2:21:29 PM’, 0, 75.0, 0, 113.0, 0, 11.0, 0, 44.0, 0, 34.0, 0, 34.0, 0, 35.0, 0, None, 0, 0.0, 0, 0.0, 0, 0]
[1585, 0, ‘’, ‘718FW 05’, ‘718FW082’, ‘7/6/2012 2:22:14 PM’, 0, 63.0, 0, 103.0, 0, 47.0, 0, 261.0, 0, 276.0, 0, 266.0, 0, 283.0, 0, None, 0, 278.0, 0, 264.0, 0, 0]
[1586, 0, ‘’, ‘718FW 07’, ‘718FW101’, ‘7/6/2012 2:22:23 PM’, 0, 63.0, 0, 114.0, 0, 6.0, 0, 48.0, 0, 35.0, 0, 31.0, 0, 34.0, 0, None, 0, 35.0, 0, 33.0, 0, 0]
[1587, 0, ‘’, ‘718FW 09C’, ‘718FW086’, ‘7/6/2012 2:22:32 PM’, 0, 78.0, 0, 101.0, 0, 73.0, 0, 259.0, 0, 257.0, 0, 273.0, 0, 282.0, 0, None, 0, 304.0, 0, 319.0, 0, 0]
[1588, 0, ‘’, ‘718FW 10’, ‘718FW087’, ‘7/6/2012 1:17:28 PM’, 0, 75.0, 0, 115.0, 0, 0.0, 1, 0.0, 1, 18.0, 0, 21.0, 0, 104.0, 0, None, 0, 0.0, 0, 0.0, 0, 0]
[1589, 0, ‘’, ‘718FW 11’, ‘718FW090’, ‘7/6/2012 2:22:53 PM’, 0, 74.0, 0, 116.0, 0, 0.0, 1, 0.0, 1, 0.0, 0, 0.0, 0, 25.0, 0, None, 0, 0.0, 0, 0.0, 0, 0]
[1590, 0, ‘’, ‘718FW 12’, ‘718FW091’, ‘7/6/2012 2:23:32 PM’, 0, 74.0, 0, 114.0, 0, 1.0, 0, 26.0, 0, 30.0, 0, 31.0, 0, 38.0, 0, None, 0, 36.0, 0, 38.0, 0, 0]
[1591, 0, ‘’, ‘718FW 13’, ‘718FW092’, ‘7/6/2012 2:21:50 PM’, 0, 77.0, 0, 102.0, 0, 36.0, 0, 247.0, 0, 254.0, 0, 208.0, 0, 264.0, 0, None, 0, 278.0, 0, 265.0, 0, 0]
[-1, 0, ‘Summary’, ‘Count: 10’, ‘’, ‘’, 2, 70.6, 2, 110.8, 2, 17.6, 2, 918.0, 2, 947.0, 2, 907.0, 2, 1110.0, 2, 0, 2, 974.0, 2, 963.0, 2, 1]
[-1, 0, ‘Outlet’, ‘’, ‘’, ‘’, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 2]
[1601, 0, ‘’, ‘718FW TB1 CM’, ‘718FW200’, ‘7/6/2012 1:28:07 PM’, 0, 59.0, 0, 97.0, 0, 46.0, 0, 887.0, 0, 978.0, 0, 944.0, 0, 1117.0, 0, 1271.0, 0, 1004.0, 0, 996.0, 0, 0]
[-1, 0, ‘Summary’, ‘Count: 1’, ‘’, ‘’, 2, 59.0, 2, 97.0, 2, 46.0, 2, 887.0, 2, 978.0, 2, 944.0, 2, 1117.0, 2, 1271.0, 2, 1004.0, 2, 996.0, 2, 1][/ul]
ERROR [ClientSystemUtilities$1-AWT-EventQueue-0] Error running function from fpmi.system.invokeLater
Traceback (innermost last):
File “module:table”, line 431, in doLater
TypeError: Unable to convert row 13, column 21 to type class java.lang.Integer

Here is the line of code:

table.data = system.dataset.toDataSet(header, data)

Every value in the same column location must be the same datatype. The reason that error occurred is that every row (other than the last two rows) has an integer in column 21. The last two rows have floats. If you change column 21 in the last two rows to integers, or all of the other rows except the last two to floats, it should work.

1 Like