Hello again friends,
I am coming to you today with yet another issue. I am trying to assign a cell from a pydataset to a variable so I can write that to another table. Currently when I am trying to do that I get a strange error:
Traceback (most recent call last):
File “event:actionPerformed”, line 11, in
AttributeError: write-only attr: data
Here is my code:
inputTable = event.source.parent.getComponent('inputTable').data
inputTablePySet = system.dataset.toPyDataSet(inputTable)
outputTable = event.source.parent.getComponent('outputTable').data
componentID = event.source.parent.getComponent('inputTextField').text
dataList = []
updatedTable = ''
for row in inputTablePySet:
params = inputTablePySet.data.getValueAt(row, 'Scanned In')
dataList.append(runNamedQuery(ScanSearch, params))
updatedTable = system.dataset.addRow(outputTable, dataList)
outputTable.data = updatedTable
And here is the full error code:
Traceback (most recent call last):
File "<event:actionPerformed>", line 11, in <module>
AttributeError: write-only attr: data
at org.python.core.Py.AttributeError(Py.java:207)
at org.python.core.PyBeanProperty._doget(PyBeanProperty.java:28)
at org.python.core.PyObject._doget(PyObject.java:1173)
at org.python.core.PyObject.__get__(PyObject.java:3816)
at org.python.core.PyObject.object___findattr__(PyObject.java:3848)
at org.python.core.PyObject.__findattr_ex__(PyObject.java:989)
at org.python.core.PyObject.__getattr__(PyObject.java:1025)
at org.python.pycode._pyx100.f$0(<event:actionPerformed>:10)
at org.python.pycode._pyx100.call_function(<event:actionPerformed>)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at com.inductiveautomation.ignition.common.script.ScriptManager.runCode(ScriptManager.java:799)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.runActions(ActionAdapter.java:206)
at com.inductiveautomation.factorypmi.application.binding.action.ActionAdapter.invoke(ActionAdapter.java:297)
at com.inductiveautomation.factorypmi.application.binding.action.RelayInvocationHandler.invoke(RelayInvocationHandler.java:57)
at com.sun.proxy.$Proxy64.actionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.desktop/java.awt.Component.processMouseEvent(Unknown Source)
at java.desktop/javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.desktop/java.awt.Component.processEvent(Unknown Source)
at java.desktop/java.awt.Container.processEvent(Unknown Source)
at java.desktop/java.awt.Component.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.desktop/java.awt.Container.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Window.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.Component.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.desktop/java.awt.EventQueue$5.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
Ignition v8.1.7 (b2021060314)
Java: Azul Systems, Inc. 11.0.11
Thanks you Ignition wizards.
Tyler