# UnicodeEncodeError when running playbook using git hook post-receive

**URL:** <https://forum.ansible.com/t/unicodeencodeerror-when-running-playbook-using-git-hook-post-receive/13360>\
**Category:** Ansible Project\
**Created:** [August 26, 2013, 5:57am UTC](https://forum.ansible.com/t/unicodeencodeerror-when-running-playbook-using-git-hook-post-receive/13360 "2013-08-26T05:57:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafiq\_Rahim](https://avatars.discourse-cdn.com/v4/letter/r/f6c823/32.png) [@Rafiq\_Rahim](https://forum.ansible.com/u/Rafiq_Rahim)\
**Post date:** [August 26, 2013, 5:57am UTC](https://forum.ansible.com/t/unicodeencodeerror-when-running-playbook-using-git-hook-post-receive/13360/1 "2013-08-26T05:57:21Z")

</div>

Hi guys,

First of all, the playbook contains tasks with name that contains Japanese UTF-8 character.Playbook ran without problem when I ran it through terminal, but I got these errors when git hook execute the playbook.  
Any idea how to solve this? I am using ansible 1.3

remote: Traceback (most recent call last):  
remote: File “/usr/bin/ansible-playbook”, line 268, in   
remote: sys.exit(main(sys.argv[1:]))  
remote: File “/usr/bin/ansible-playbook”, line 208, in main  
remote: pb.run()  
remote: File “/usr/lib/python2.6/site-packages/ansible/playbook/ **init**.py”, line 262, in run  
remote: if not self.\_run\_play(play):  
remote: File “/usr/lib/python2.6/site-packages/ansible/playbook/ **init**.py”, line 566, in \_run\_play  
remote: if not self.\_run\_task(play, task, False):  
remote: File “/usr/lib/python2.6/site-packages/ansible/playbook/ **init**.py”, line 349, in \_run\_task  
remote: self.callbacks.on\_task\_start(template(play.basedir, task.name, task.module\_vars, lookup\_fatal=False, filter\_fatal=False), is\_handler)  
remote: File “/usr/lib/python2.6/site-packages/ansible/callbacks.py”, line 603, in on\_task\_start  
remote: display(banner(msg))  
remote: File “/usr/lib/python2.6/site-packages/ansible/callbacks.py”, line 131, in display  
remote: print msg2  
remote: UnicodeEncodeError: ‘ascii’ codec can’t encode characters in position 8-16: ordinal not in range(128)

Thanks!

Rafiq

---

<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:** [August 26, 2013, 7:50pm UTC](https://forum.ansible.com/t/unicodeencodeerror-when-running-playbook-using-git-hook-post-receive/13360/2 "2013-08-26T19:50:32Z")

</div>

Hi Rafiq,

Please file a github ticket for this issue and we (or someone else) can take a look.

Thanks!
