# Script Attribute Error: Object has no attribute 'value'

**URL:** <https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [November 17, 2021, 3:12pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187 "2021-11-17T15:12:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Potts](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ryan\_Potts](https://forum.inductiveautomation.com/u/Ryan_Potts)\
**Post date:** [November 17, 2021, 3:12pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/1 "2021-11-17T15:12:21Z")

</div>

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.

```auto
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')

```

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 17, 2021, 3:20pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/2 "2021-11-17T15:20:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ryan\_Potts](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ryan\_Potts](https://forum.inductiveautomation.com/u/Ryan_Potts)\
**Post date:** [November 17, 2021, 3:37pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/3 "2021-11-17T15:37:11Z")

</div>

They are both system tags.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [November 17, 2021, 3:40pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/4 "2021-11-17T15:40:43Z")

</div>

Can you show us what comes before that transform ?

---

<div class="post-metadata">

**Author:** ![Ryan\_Potts](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ryan\_Potts](https://forum.inductiveautomation.com/u/Ryan_Potts)\
**Post date:** [November 17, 2021, 3:46pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/5 "2021-11-17T15:46:57Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 17, 2021, 4:11pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/6 "2021-11-17T16:11:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Ryan\_Potts](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ryan\_Potts](https://forum.inductiveautomation.com/u/Ryan_Potts)\
**Post date:** [November 17, 2021, 4:22pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/7 "2021-11-17T16:22:53Z")

</div>

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.

 ![Screenshot 2021-11-17 112010](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/8/28d3bddf4d554a70326c12432a155f2e08240cb9.png)

Subcode: Error\_ScriptEval  
 ![Screenshot 2021-11-17 102030](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/500dcb212735645269fbc4edd8a57eb6d16737ab.png)

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [November 17, 2021, 4:24pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/8 "2021-11-17T16:24:58Z")

</div>

> [@Ryan\_Potts](#):
>
> ```auto
> paths = [path.value for path in value.historyParameters.paths.value]
> columnNames = [columnName.value for columnName in value.historyParameters.columnNames.value]
> 
> ```

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.

---

<div class="post-metadata">

**Author:** ![Ryan\_Potts](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ryan\_Potts](https://forum.inductiveautomation.com/u/Ryan_Potts)\
**Post date:** [November 17, 2021, 4:50pm UTC](https://forum.inductiveautomation.com/t/script-attribute-error-object-has-no-attribute-value/53187/9 "2021-11-17T16:50:03Z")

</div>

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