Column indexing error on 8.0 but works on 8.1

Hi all,
I am having issues with with using [-1] in my projectlibrary script on a server with Ignition 8.0.14, but it works perfectly fine on another server with Ignition 8.1.1.
Down below is relevant examples of the code with regards to the issue:

table_batch = system.db.runQuery(general_query % lastrow, db_name)
table_batch = system.dataset.toPyDataSet(table_batch)

column_index = table_batch.getColumnIndex(“LASTROW”)

new_lastrow = table_batch[-1][column_index]

When I change the [-1] to a [0] it works fine on this server, but we would like to have it as [-1]

Best regards,

IIRC, v8.1 greatly improved the PyDataset’s emulation of PyList. So no, you’ll need to upgrade.

It is a bit crazy to stay on an EOL version, too. See this discussion:


Thanks a lot for the answer :slight_smile:

I will go ahead and start the upgrade then!

Best regards,