# Reading the tag error due to special characters in tag

**URL:** <https://forum.inductiveautomation.com/t/reading-the-tag-error-due-to-special-characters-in-tag/85077>\
**Category:** Ignition\
**Created:** [February 1, 2024, 7:38am UTC](https://forum.inductiveautomation.com/t/reading-the-tag-error-due-to-special-characters-in-tag/85077 "2024-02-01T07:38:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [February 1, 2024, 7:38am UTC](https://forum.inductiveautomation.com/t/reading-the-tag-error-due-to-special-characters-in-tag/85077/1 "2024-02-01T07:38:34Z")

</div>

Hi

i have list in that one tag have special characters

```auto
allTags = ['Raw Materials/ROCK FEEDING/Conveyors/Belt_PV_Débit sur le T9',
           'Raw Materials/ROCK FEEDING/Conveyors/Belt']

```

code i am using

`PathsList = [tVal.value for tVal in system.tag.readBlocking([path+".OPCPath" for path in allTags])]`

error  
Traceback (most recent call last):  
File "", line 14, in   
ValueError: Invalid path element 'Raw Materials/ROCK FEEDING/Conveyors/Belt\_PV\_DÃ©bit sur le T9': Illegal character '©' (Line 1 , Char 95)

can any help me to skip the error and run the for loop for other tags

i need to read 200 tags .my one liner script works very faster that's why i am using that without using try and except

---

<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:** [February 1, 2024, 8:06am UTC](https://forum.inductiveautomation.com/t/reading-the-tag-error-due-to-special-characters-in-tag/85077/2 "2024-02-01T08:06:04Z")

</div>

Try adding a `u` before strings that contain non-ascii characters:

```python
paths = [u"path/to/tags", u"some/other/tag"]

```

But really, REALLY, you should avoid any exotic character in tags paths. If you can't use it as a python variable name, don't use it in a tag path. That means no spaces, no dashes (`-`), no slashes, brackets, parentheses, tabs, dots, accents, emojis, etc.

It's not always possible to change them when they've been used all over the project and/or they're historized, in this case try the unicode thing.

---

<div class="post-metadata">

**Author:** ![prasath.t](https://avatars.discourse-cdn.com/v4/letter/p/898d66/32.png) [@prasath.t](https://forum.inductiveautomation.com/u/prasath.t)\
**Post date:** [February 1, 2024, 8:14am UTC](https://forum.inductiveautomation.com/t/reading-the-tag-error-due-to-special-characters-in-tag/85077/4 "2024-02-01T08:14:22Z")

</div>

Thanks for the solution, Its working

added unicode in script

`PathsList = [tVal.value for tVal in system.tag.readBlocking([unicode(path)+".OPCPath" for path in allTags])]`
