I get the following error 6 to 10 times when I open a window the first time after launching the Vision project:
Traceback (most recent call last):
File “event:propertyChange”, line 5, in
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Dataset can not be null
Ignition v8.0.5 (b2019101516)
Java: Azul Systems, Inc. 11.0.4
If I move to another window in the project and then come back, the error does not happen. Also, it won’t happen when I run the script in designer. Also it seems to function perfectly except for the errors.
The script is short:
1 event.source.parent.getComponent(‘MES Analysis Controller’).refresh()
2 # Get the dataset from the MES Controller and make a dataset called “data”
3 data = event.source.parent.getComponent(“MES Analysis Controller”).data
5 formattedData = system.dataset.formatDates(data, “H:m”)
6 table = event.source.parent.getComponent(‘table’)
7 table.data = formattedData
I’ve run this in designer by triggering with pushbuttons and printing the datasets to the console, but it’s never null when I do that.
I feel like I’m missing something really obvious here. Does anyone see anything obviously wrong?