system.dataset.updateRow -can't be coerced to pyDictionary

Trying to update the dataset in a template canvas templates dataset, the system.dataset.addRow worked fine, but the example from the ignition documentation is coming up w/ the following error:

For this example I’m attempting to update the 40th row in the Template Canvas database, there are 9 columns. Code and error below:

updates = {“9999”,“rectangle”,“300”,“300”,“300”,“50”,“50”,“n/a”,“0”}
chart = event.source.parent.getComponent(“Template Canvas”)
newPens = system.dataset.updateRow(chart.templates, 40, updates)
chart.templates = newPens

Error:

Traceback (most recent call last):
File “event:actionPerformed”, line 5, in
TypeError: updateRow(): 3rd arg can’t be coerced to org.python.core.PyDictionary

do you need to call system.dataset.toPyDataSet() somewhere?

https://docs.inductiveautomation.com/display/DOC80/system.dataset.toPyDataSet

data = system.dataset.toPyDataSet(chart.templates)??

Sorry I don’t know much about the template canvas templates dataset

I don’t know entirely too much, template canvas dataset appears to just be any normal dataset in ignition.

I followed the documentation for addRow and it works beautifully, but updateRow appears to have some issues. Ill try reading up on toPyDataSet

This is not a dictionary. updateRow takes a dictionary as its 3rd parameter where the keys are the column names.