Script Attribute Error: Object has no attribute 'value'

Just updated from 8.0 to 8.1 and have an issue now with a script that creates a trend for some motors. I have tried to add in different ‘value’ items, but still receive the same error message.

Any help is appreciated.

def transform(self, value, quality, timestamp):
  paths = [path.value for path in value.historyParameters.paths.value]
  columnNames = [columnName.value for columnName in value.historyParameters.columnNames.value]

  for pen in self.view.custom.pens:
    axisName = pen['axis']
    penAxis = None
    for i in range(len(self.view.custome.axes)):
      axis = self.view.custom.axes[i]
      if axis['name'] == axisName:
        penAxis = i
        break

    if penAxis is not None and self.view.custom.axes[penAxis]['autoRange']:
      try:
        max = system.tag.queryTagHistory(paths=[pen['path']], startDate=value.startDate, endDate=value.endDate, returnSize=1, aggregationMode='Maximum')
        upperBound = max.getValueAt(0,1)
        self.view.custom.axes[i]['upperBound'] = upperBound + (1 if upperBound > 0 else -1)

        min = system.tag.queryTagHistory(paths=[pen['path']], startDate=value.startDate, endDate=value.endDate, returnSize=1, aggregationMode='Minimum')
        lowerBound = max.getValueAt(0,1)
        self.view.custom.axes[i]['lowerBound'] = lowerBound + (1 if lowerBound > 0 else -1)
      except:
        pass

  return system.tag.queryTagHistory(paths=paths, columnNames=columnNames, startDate=value.startDate, endDate=value.endDate, returnSize=300, aggregationMode='MinMax')

What are the type of value.historyParameters.paths and value.historyParameters.columnNames ?

They are both system tags.

Can you show us what comes before that transform ?

If you mean in the Edit Binding page under Configure Expression Structure Binding it is:

endDate :toMillis({view.custom.dateRange.endDate})
historyParameters :{this.custom.historyParameters}
startDate :{view.custom.dateRange.startDate}

What’s the exact error message, and does it include a line number?

Here are some screen shots, the top is from Designer with the error triangle on the “Props” title. The second is from the Prespective Project.

I do not have an line errors that I have been able to locate.

Subcode: Error_ScriptEval
Screenshot 2021-11-17 102030

I wonder if it's just these lists? What if you drop the .value from e.g. value.historyParameters.paths.value?

You shouldn't need to worry about getting qualified values from property trees, which might be a change in behavior from the version your script was first written in.

Amazing! Removed the end .value from all of the calls and now it is working properly.