# Tagvalue read fault

**URL:** <https://forum.inductiveautomation.com/t/tagvalue-read-fault/59870>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [May 21, 2022, 3:11pm UTC](https://forum.inductiveautomation.com/t/tagvalue-read-fault/59870 "2022-05-21T15:11:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [May 21, 2022, 3:12pm UTC](https://forum.inductiveautomation.com/t/tagvalue-read-fault/59870/1 "2022-05-21T15:12:00Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/2/5294392268ce6f02a7e645a54fdb755ef4958a00.png)  
I need read all this folder’s tag value

```auto
pathList=[]
results = system.tag.browse(path = '[Malu OPC tags]Slitter/MaterialJob/Cut1', filter = {})
for result in results.getResults():
    path=result[u'fullPath']
    pathList.append(path)
    
Values = system.tag.readBlocking(pathList)   

```

I have try this code, but it report fault

```auto
23:10:14.167 [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.client.util.gui.ErrorUtil - <HTML>Error executing script for event:&nbsp;<code><b>actionPerformed</b></code><BR>on component:&nbsp;<code><b>Return</b></code>.
com.inductiveautomation.ignition.common.script.JythonExecException: Traceback (most recent call last):
  File "<event:actionPerformed>", line 7, in <module>
TypeError: expected a str

	at org.python.core.Py.TypeError(Py.java:236)
	at org.python.core.PyObject.asString(PyObject.java:4078)
	at com.inductiveautomation.ignition.common.script.builtin.AbstractTagUtilities.extractTagPaths(AbstractTagUtilities.java:398)
	at

```

how to modify the code ? thanks a lot

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [May 21, 2022, 3:59pm UTC](https://forum.inductiveautomation.com/t/tagvalue-read-fault/59870/2 "2022-05-21T15:59:42Z")

</div>

Try changing line 7 to  
` pathList.append(str(path))`  
With out the string conversion you get something like this:  
`[[default]_types_, [default]Machine1, [default]Machine 2, etc.]`

With the string conversion you get

```auto
[
  '[default]_types_', 
  '[default]Machine1', 
  '[default]Machine 2', 
  '[default]oneShot', 
  '[default]oneShotLatch', '[default]Scanner', 
  '[default]ScannerTimestamp', '[default]Ski lift speed', 
  '[default]statusBit']
  [
    [null, Bad_Unsupported, Sun May 15 09:22:08 BST 2022 (1652602928212)], 
    [null, Bad_Unsupported, Sun May 15 09:22:08 BST 2022 (1652602928212)], 
    [null, Bad_Unsupported, Sun May 15 09:22:08 BST 2022 (1652602928212)], ...
  ]
]

```

You can post your code into the Script Console to test it. (That’s how I tested it.)

---

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [May 22, 2022, 5:05am UTC](https://forum.inductiveautomation.com/t/tagvalue-read-fault/59870/3 "2022-05-22T05:05:00Z")

</div>

thanks , it works
