# Str.strip returns \<built-in method strip of unicode object at 0xa\> over tag.write instead of actual

**URL:** <https://forum.inductiveautomation.com/t/str-strip-returns-built-in-method-strip-of-unicode-object-at-0xa-over-tag-write-instead-of-actual/31323>\
**Category:** Ignition\
**Created:** [January 16, 2020, 1:26am UTC](https://forum.inductiveautomation.com/t/str-strip-returns-built-in-method-strip-of-unicode-object-at-0xa-over-tag-write-instead-of-actual/31323 "2020-01-16T01:26:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [January 16, 2020, 1:26am UTC](https://forum.inductiveautomation.com/t/str-strip-returns-built-in-method-strip-of-unicode-object-at-0xa-over-tag-write-instead-of-actual/31323/1 "2020-01-16T01:26:09Z")

</div>

I got a script that reads a file from a mapped drive and returns the latest entry…

```auto
import re
def get_file_part(machine):
	path = ('Z:\Qa_Reports\Daily Production Data\%s\%s_PCM.txt' % (machine,machine))
	x = system.file.readFileAsString(path)
	result = re.findall('\s\d\d\d\s', x)
	z = result[-1]
	t = z.strip
	return t
op = lot.get_file_part('D3')

system.tag.write('[default]SCADA/playground/New Tag 1',op)

```

I’ve tried several things including below:

```auto
	z = result[-1].strip
	return z

```

No matter what I seem to do. I get the following returned.

![1](https://us1.discourse-cdn.com/inductiveautomation/original/2X/b/b8e446ca022b9d11d9e3afba2c7cfafcdda6321d.jpeg)

I think you can format tags to remove leading and trailing whitespaces but that is besides the point

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [January 16, 2020, 1:36am UTC](https://forum.inductiveautomation.com/t/str-strip-returns-built-in-method-strip-of-unicode-object-at-0xa-over-tag-write-instead-of-actual/31323/2 "2020-01-16T01:36:40Z")

</div>

z.strip()

---

<div class="post-metadata">

**Author:** ![wking](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/wking/32/21823_2.png) [@wking](https://forum.inductiveautomation.com/u/wking)\
**Post date:** [January 16, 2020, 2:58am UTC](https://forum.inductiveautomation.com/t/str-strip-returns-built-in-method-strip-of-unicode-object-at-0xa-over-tag-write-instead-of-actual/31323/3 "2020-01-16T02:58:49Z")

</div>

Geeeeezzzz thanks, man!

> [@jpark](#):
>
> ()
