# Throw exception when excute os\_image openstack module

**URL:** <https://forum.ansible.com/t/throw-exception-when-excute-os-image-openstack-module/21104>\
**Category:** Ansible Project\
**Created:** [April 8, 2016, 9:42am UTC](https://forum.ansible.com/t/throw-exception-when-excute-os-image-openstack-module/21104 "2016-04-08T09:42:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaycoolzhao](https://avatars.discourse-cdn.com/v4/letter/j/57b2e6/32.png) [@jaycoolzhao](https://forum.ansible.com/u/jaycoolzhao)\
**Post date:** [April 8, 2016, 9:42am UTC](https://forum.ansible.com/t/throw-exception-when-excute-os-image-openstack-module/21104/1 "2016-04-08T09:42:51Z")

</div>

Hi,

I’m confused why os\_image throw this exception.

$ ansible-playbook -i hosts openstack.yml -c local -vvv  
No config file found; using defaults  
1 plays in openstack.yml

PLAY \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

TASK [os\_image] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /home/osadmin/zyx/openstack.yml:5  
ESTABLISH LOCAL CONNECTION FOR USER: osadmin  
10.170.82.226 EXEC ( umask 22 && mkdir -p “$( echo $HOME/.ansible/tmp/ansible-tmp-1460136318.86-251808477639947 )” && echo “$( echo $HOME/.ansible/tmp/ansible-tmp-1460136318.86-251808477639947 )” )  
10.170.82.226 PUT /tmp/tmpc94I\_w TO /home/osadmin/.ansible/tmp/ansible-tmp-1460136318.86-251808477639947/os\_image  
10.170.82.226 EXEC LANG=en\_HK.UTF-8 LC\_ALL=en\_HK.UTF-8 LC\_MESSAGES=en\_HK.UTF-8 /usr/bin/python /home/osadmin/.ansible/tmp/ansible-tmp-1460136318.86-251808477639947/os\_image; rm -rf “/home/osadmin/.ansible/tmp/ansible-tmp-1460136318.86-251808477639947/” \> /dev/null 2\>&1  
An exception occurred during task execution. The full traceback is:  
Traceback (most recent call last):  
File “/home/osadmin/.ansible/tmp/ansible-tmp-1460136318.86-251808477639947/os\_image”, line 22, in   
import shade  
File “/usr/local/lib/python2.7/dist-packages/shade/ **init**.py”, line 24, in   
from shade.openstackcloud import OpenStackCloud  
File “/usr/local/lib/python2.7/dist-packages/shade/openstackcloud.py”, line 26, in   
import cinderclient.client  
File “/usr/local/lib/python2.7/dist-packages/cinderclient/client.py”, line 30, in   
from keystoneclient import discover  
File “/usr/local/lib/python2.7/dist-packages/keystoneclient/discover.py”, line 25, in   
from keystoneclient.v2\_0 import client as v2\_client  
File “/usr/local/lib/python2.7/dist-packages/keystoneclient/v2\_0/ **init**.py”, line 1, in   
from keystoneclient.v2\_0.client import Client # noqa  
File “/usr/local/lib/python2.7/dist-packages/keystoneclient/v2\_0/client.py”, line 21, in   
from keystoneclient import httpclient  
File “/usr/local/lib/python2.7/dist-packages/keystoneclient/httpclient.py”, line 147, in   
class HTTPClient(baseclient.Client, base.BaseAuthPlugin):  
File “/usr/local/lib/python2.7/dist-packages/keystoneclient/httpclient.py”, line 257, in HTTPClient  
user\_agent=USER\_AGENT, connect\_retries=None, \*\*kwargs):  
File “/usr/local/lib/python2.7/dist-packages/debtcollector/renames.py”, line 38, in decorator  
@six.wraps(f, assigned=\_utils.get\_assigned(f))  
AttributeError: ‘module’ object has no attribute ‘wraps’  
fatal: [10.170.82.226]: FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_name”: “os\_image”}, “parsed”: false}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
10.170.82.226 : ok=0 changed=0 unreachable=0 failed=1
