# Getting  "argument of type 'NoneType' is not iterable" with -c winrm

**URL:** <https://forum.ansible.com/t/getting-argument-of-type-nonetype-is-not-iterable-with-c-winrm/20165>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [January 9, 2016, 4:35pm UTC](https://forum.ansible.com/t/getting-argument-of-type-nonetype-is-not-iterable-with-c-winrm/20165 "2016-01-09T16:35:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![techraf](https://avatars.discourse-cdn.com/v4/letter/t/ba9def/32.png) [@techraf](https://forum.ansible.com/u/techraf)\
**Post date:** [January 9, 2016, 4:35pm UTC](https://forum.ansible.com/t/getting-argument-of-type-nonetype-is-not-iterable-with-c-winrm/20165/1 "2016-01-09T16:35:03Z")

</div>

I am trying to provision a Windows machine from Mac OS X. When running:

`ansible -i inventory winserver -m setup -c winrm -vvv`

I get the following error:

`  
No config file found; using defaults  
An exception occurred during task execution. The full traceback is:  
Traceback (most recent call last):  
File “/usr/local/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/executor/process/worker.py”, line 134, in run  
shared\_loader\_obj,  
File “/usr/local/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/executor/task\_executor.py”, line 118, in run  
res = self.\_execute()  
File “/usr/local/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/executor/task\_executor.py”, line 352, in \_execute  
self.\_connection.set\_host\_overrides(host=self.\_host)  
File “/usr/local/lib/python2.7/site-packages/ansible-2.0.0-py2.7.egg/ansible/plugins/connection/winrm.py”, line 93, in set\_host\_overrides  
if ‘@’ in self.\_winrm\_user:  
TypeError: argument of type ‘NoneType’ is not iterable

192.168.20.10 | FAILED! =\> {  
“failed”: true,  
“stdout”: “”  
}  
`

I ran:

`pip install "pywinrm>=0.1.1"`

and use the following Vagrantfile:

`

# -_- mode: ruby -_-

# vi: set ft=ruby :

Vagrant.configure(2) do |windows|  
windows.vm.box = “mwrock/Windows2012R2”  
windows.vm.network “private\_network”, ip: “192.168.20.10”  
windows.vm.hostname = “winserver”  
windows.vm.guest = :windows  
windows.vm.communicator = “winrm”  
end  
`

Am I missing something or came across some bug?

---

<div class="post-metadata">

**Author:** ![David\_O\_Brien](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@David\_O\_Brien](https://forum.ansible.com/u/David_O_Brien)\
**Post date:** [January 16, 2016, 5:44am UTC](https://forum.ansible.com/t/getting-argument-of-type-nonetype-is-not-iterable-with-c-winrm/20165/2 "2016-01-16T05:44:42Z")

</div>

Exactly the same problem here. Happens since I updated to Ansible 2.0 this morning ☹
