# ansible docker\_container python error

**URL:** <https://forum.ansible.com/t/ansible-docker-container-python-error/23980>\
**Category:** Ansible Project\
**Created:** [March 15, 2017, 4:29pm UTC](https://forum.ansible.com/t/ansible-docker-container-python-error/23980 "2017-03-15T16:29:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Franck1](https://avatars.discourse-cdn.com/v4/letter/f/a6a055/32.png) [@Franck1](https://forum.ansible.com/u/Franck1)\
**Post date:** [March 15, 2017, 4:29pm UTC](https://forum.ansible.com/t/ansible-docker-container-python-error/23980/1 "2017-03-15T16:29:29Z")

</div>

Hi,

With Ansible 2.2.1.0, Python 2.7.12  
i deployed docker and containers without pb for weeks using playbooks with docker\_container module

now after ansible upgrade and docker engine new version i receive an error when trying to start containers with docker\_container  
the error is :  
fatal: [web1]: FAILED! =\> {“changed”: false, “failed”: true, “module\_stderr”: “Shared connection to web1 closed.\r\n”, “module\_stdout”: “Traceback (most recent call last):\r\n File "/tmp/ansible\_ejWvBJ/ansible\_module\_docker\_container.py", line 652, in \r\n from ansible.module\_utils.docker\_common import \*\r\n File "/tmp/ansible\_ejWvBJ/ansible\_modlib.zip/ansible/module\_utils/docker\_common.py", line 124, in \r\nTypeError: Error when calling the metaclass bases\r\n module. **init** () takes at most 2 arguments (3 given)\r\n”, “msg”: “MODULE FAILURE”}

i tried to downgrade docker engine, docker-py, ansible python on ansible host or on target host etc… but nothing to do  
still the same error

here is what is installed on target server :  
python 2.7.5

#Rpms  
python-docker-pycreds-1.10.6-1.el7.noarch  
docker-engine-selinux-17.03.0.ce-1.el7.centos.noarch  
docker-engine-17.03.0.ce-1.el7.centos.x86\_64  
python-docker-py-1.10.6-1.el7.noarch

[root@localhost ~]# pip list  
docker (2.1.0)  
docker-compose (1.11.2)  
docker-py (1.10.6)  
docker-pycreds (0.2.1)  
dockerpty (0.4.1)

any idea of what could resolve this ?

thanks in advance
