# TypeError: unsupported operand type(s) for +: 'int' and 'str'

**URL:** <https://forum.ansible.com/t/typeerror-unsupported-operand-type-s-for-int-and-str/17308>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 19, 2015, 12:02am UTC](https://forum.ansible.com/t/typeerror-unsupported-operand-type-s-for-int-and-str/17308 "2015-01-19T00:02:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![senorsmile](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/senorsmile/32/9024_2.png) [@senorsmile](https://forum.ansible.com/u/senorsmile)\
**Post date:** [January 19, 2015, 12:02am UTC](https://forum.ansible.com/t/typeerror-unsupported-operand-type-s-for-int-and-str/17308/1 "2015-01-19T00:02:56Z")

</div>

I am getting some strange errors when trying to run ansible against some new ubuntu 14.04 boxes. I am using roles that I have already used before and had no issues. I have tried several different roles (including a simple one that simply has a debug message) to no avail. I can still run ansible against everything else in my environment (ubuntu 12.04 boxes) as well as a test 14.04 ubuntu box on vultr.

As you can see, it seems to be erring at the gathering facts stage.

`  
PLAY [Deploy common roles] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

GATHERING FACTS \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
fatal: [192.168.1.9] =\> Traceback (most recent call last):  
File “/usr/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 590, in \_executor  
exec\_rc = self.\_executor\_internal(host, new\_stdin)  
File “/usr/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 792, in \_executor\_internal  
return self.\_executor\_internal\_inner(host, self.module\_name, self.module\_args, inject, port, complex\_args=complex\_args)  
File “/usr/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 1025, in \_executor\_internal\_inner  
result = handler.run(conn, tmp, module\_name, module\_args, inject, complex\_args)  
File “/usr/lib/python2.7/site-packages/ansible/runner/action\_plugins/normal.py”, line 57, in run  
return self.runner.\_execute\_module(conn, tmp, module\_name, module\_args, inject=inject, complex\_args=complex\_args)  
File “/usr/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 555, in \_execute\_module  
res = self.\_low\_level\_exec\_command(conn, cmd, tmp, sudoable=sudoable, in\_data=in\_data)  
File “/usr/lib/python2.7/site-packages/ansible/runner/ **init**.py”, line 1173, in \_low\_level\_exec\_command  
in\_data=in\_data)  
File “/usr/lib/python2.7/site-packages/ansible/runner/connection\_plugins/ssh.py”, line 353, in exec\_command  
stdin.write(self.runner.sudo\_pass + ‘\n’)  
TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’

TASK: [common | Install basic cli apps] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
FATAL: no hosts matched or all hosts have already failed – aborting

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
to retry, use: --limit @/home/shaun/site.retry

192.168.1.9 : ok=0 changed=0 unreachable=1 failed=0

`

---

<div class="post-metadata">

**Author:** ![senorsmile](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/senorsmile/32/9024_2.png) [@senorsmile](https://forum.ansible.com/u/senorsmile)\
**Post date:** [January 19, 2015, 12:09am UTC](https://forum.ansible.com/t/typeerror-unsupported-operand-type-s-for-int-and-str/17308/2 "2015-01-19T00:09:47Z")

</div>

Oddly enough, I CAN run ansible commands, just not playbooks:

`  
ansible 192.168.1.9 -i hosts -m setup

`

runs just fine.

---

<div class="post-metadata">

**Author:** ![senorsmile](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/senorsmile/32/9024_2.png) [@senorsmile](https://forum.ansible.com/u/senorsmile)\
**Post date:** [March 7, 2015, 10:39pm UTC](https://forum.ansible.com/t/typeerror-unsupported-operand-type-s-for-int-and-str/17308/3 "2015-03-07T22:39:17Z")

</div>

No one has run into this?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [March 7, 2015, 10:53pm UTC](https://forum.ansible.com/t/typeerror-unsupported-operand-type-s-for-int-and-str/17308/4 "2015-03-07T22:53:59Z")

</div>

Looks like this is likely resolved by [https://github.com/ansible/ansible/pull/10222](https://github.com/ansible/ansible/pull/10222)
