# Ansible python error related to unicode?

**URL:** <https://forum.ansible.com/t/ansible-python-error-related-to-unicode/13608>\
**Category:** Ansible Project\
**Created:** [October 3, 2013, 8:03pm UTC](https://forum.ansible.com/t/ansible-python-error-related-to-unicode/13608 "2013-10-03T20:03:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Reagan](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Post date:** [October 3, 2013, 8:03pm UTC](https://forum.ansible.com/t/ansible-python-error-related-to-unicode/13608/1 "2013-10-03T20:03:06Z")

</div>

I keep getting an odd error when trying to configure my php.ini template.

It ends with:

> UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xa0’ in position 68552: ordinal not in range(128)

I’ve posted the code that causes this at: [https://gist.github.com/jerrac/0fb97c4477b7611d0ad6](https://gist.github.com/jerrac/0fb97c4477b7611d0ad6)

The error does not happen if I comment out the php\_overrides vars.

As far as I can tell, I’m saving the files as plain text. I use Sublime Text.

Any suggestions?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [October 3, 2013, 8:06pm UTC](https://forum.ansible.com/t/ansible-python-error-related-to-unicode/13608/2 "2013-10-03T20:06:17Z")

</div>

What ansible version are you using?

If the answer is 1.3 or later (the current release), please report this as an issue at [http://github.com/ansible/ansible](http://github.com/ansible/ansible)

You will need a free account.

---

<div class="post-metadata">

**Author:** ![David\_Reagan](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Post date:** [October 3, 2013, 8:25pm UTC](https://forum.ansible.com/t/ansible-python-error-related-to-unicode/13608/3 "2013-10-03T20:25:32Z")

</div>

ansible --version  
ansible 1.3.0

---

<div class="post-metadata">

**Author:** ![David\_Reagan](https://avatars.discourse-cdn.com/v4/letter/d/71e660/32.png) [@David\_Reagan](https://forum.ansible.com/u/David_Reagan)\
**Post date:** [October 3, 2013, 8:26pm UTC](https://forum.ansible.com/t/ansible-python-error-related-to-unicode/13608/4 "2013-10-03T20:26:44Z")

</div>

Posted [https://github.com/ansible/ansible/issues/4361](https://github.com/ansible/ansible/issues/4361)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [October 3, 2013, 8:55pm UTC](https://forum.ansible.com/t/ansible-python-error-related-to-unicode/13608/5 "2013-10-03T20:55:44Z")

</div>

Thanks!
