# Cloned Ansible from github, now I have 'module' object has no attribute 'COLOER\_ERROR'

**URL:** <https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736>\
**Category:** Ansible Project\
**Created:** [March 1, 2016, 9:32pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736 "2016-03-01T21:32:58Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 9:32pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/1 "2016-03-01T21:32:58Z")

</div>

When running ad-hoc ansible commands, I get the following error:

$ ansible slackware-lab-64 -m setup

[WARNING]: Error when using \<bound method CallbackModule.v2\_runner\_on\_failed of \</home/ansible-user/ansible/lib/ansible/plugins/callback/minimal.CallbackModule object at 0x21d15d0\>\>: ‘module’ object has no attribute  
‘COLOR\_ERROR’

I am also getting the ssh\_split error whenever I try to run a playbook, so my Ansible is completely broken right now.

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 9:54pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/2 "2016-03-01T21:54:51Z")

</div>

Fixed the typo in the subject. The ad-hoc commands are failing instantly after this error.

---

<div class="post-metadata">

**Author:** ![Arthur\_Reyes](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Arthur\_Reyes](https://forum.ansible.com/u/Arthur_Reyes)\
**Post date:** [March 1, 2016, 10:08pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/3 "2016-03-01T22:08:14Z")

</div>

I noticed that this module isn’t importing this module:

from ansible.utils.color import colorize, hostcolor

---

<div class="post-metadata">

**Author:** ![Arthur\_Reyes](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Arthur\_Reyes](https://forum.ansible.com/u/Arthur_Reyes)\
**Post date:** [March 1, 2016, 10:10pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/4 "2016-03-01T22:10:25Z")

</div>

To be clear, in /ansible/lib/ansible/plugins/callback/minimal, there is no import of ansible.utils.color:

# Make coding more python3-ish

from **future** import (absolute\_import, division, print\_function)  
**metaclass** = type

from ansible.plugins.callback import CallbackBase  
from ansible import constants as C

class CallbackModule(CallbackBase):

---

<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 1, 2016, 10:13pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/5 "2016-03-01T22:13:40Z")

</div>

Based on this email and your other email about the ssh error, it looks like you are running a mismatched partially updated version of ansible. I might recommend completely uninstalling and reinstalling ansible.

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:14pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/6 "2016-03-01T22:14:03Z")

</div>

That sounds like a bug, then. Do you know where to report it?

---

<div class="post-metadata">

**Author:** ![Arthur\_Reyes](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@Arthur\_Reyes](https://forum.ansible.com/u/Arthur_Reyes)\
**Post date:** [March 1, 2016, 10:21pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/7 "2016-03-01T22:21:49Z")

</div>

I would see if adding the allege missing line fixes the problem before reporting it as bug. I don’t know if I have the most current build, but that line is missing from my last pull:

$ ansible --version  
ansible 2.1.0 (devel fb797a9e77) last updated 2016/01/22 14:23:55 (GMT -500)

---

<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 1, 2016, 10:28pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/8 "2016-03-01T22:28:04Z")

</div>

In the minimal.py callback the reference is to C.COLOR\_ERROR. C comes from the ‘from ansible import constants as C’

I can see `COLOR_ERROR` in constants.py. If this error is happening, it would appear that the code is out of sync.

[https://github.com/ansible/ansible/blob/d3deb24ead59d5fdbecad3c946848537f95772ad/lib/ansible/constants.py#L274](https://github.com/ansible/ansible/blob/d3deb24ead59d5fdbecad3c946848537f95772ad/lib/ansible/constants.py#L274)

[https://github.com/ansible/ansible/blob/d3deb24ead59d5fdbecad3c946848537f95772ad/lib/ansible/plugins/callback/minimal.py#L56](https://github.com/ansible/ansible/blob/d3deb24ead59d5fdbecad3c946848537f95772ad/lib/ansible/plugins/callback/minimal.py#L56)

These changes were implemented on Dec 29.

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:34pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/9 "2016-03-01T22:34:34Z")

</div>

Hi Matt,

I did the following:

rm -rf ansible/  
git clone git://github.com/ansible/ansible.git --recursive  
cd ansible/  
source hacking/env-setup

I did it again just now. I still get the same attribute ‘COLOR\_ERROR’ when attempting ad-hoc commands and attribute split\_ssh\_args error when running playbooks.

What am I missing?  
Thanks a ton for your input! I appreciate it.

Joanna

---

<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 1, 2016, 10:39pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/10 "2016-03-01T22:39:01Z")

</div>

Do you have ansible installed anywhere else on that system?

What do you get when you run:

python -c “import sys; print sys.path”

You should see what is in your PYTHONPATH from using env-setup at the front after ‘’. If not, then something could be inserting additional paths for python to search, and you could be grabbing files from incorrect locations.

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:39pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/11 "2016-03-01T22:39:20Z")

</div>

Hi Arthur,

When I run ansible --version, I get this:

$ ansible --version  
ansible 2.1.0  
config file = /home/ansible-user/parkland/config/ansible.cfg  
configured module search path = Default w/o overrides

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:46pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/12 "2016-03-01T22:46:13Z")

</div>

It appears that I do have another installation as well. Grr. I’ll ask pip to uninstall for me.

$ python -c “import sys; print sys.path”

[‘’, ‘/usr/lib/python2.7/site-packages/ansible-2.1.0-py2.7.egg’, ‘/home/ansible/ansible/lib’, ‘/home/ansible/parkland’, ‘/usr/lib64/python27.zip’, ‘/usr/lib64/python2.7’, ‘/usr/lib64/python2.7/plat-linux2’, ‘/usr/lib64/python2.7/lib-tk’, ‘/usr/lib64/python2.7/lib-old’, ‘/usr/lib64/python2.7/lib-dynload’, ‘/usr/lib64/python2.7/site-packages’, ‘/usr/lib64/python2.7/site-packages/gtk-2.0’, ‘/usr/lib/python2.7/site-packages’, ‘/usr/lib/python2.7/site-packages’]

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 1, 2016, 10:49pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/13 "2016-03-01T22:49:38Z")

</div>

Matt, I owe you a drink.

sudo pip uninstall ansible removed the extra ansible installation. Now ansible functions again from the git clone.

Thanks!  
Joanna

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [March 2, 2016, 2:21pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/14 "2016-03-02T14:21:25Z")

</div>

run ‘make clean’ on the github repo, it seems you are mixing old files with the new code. You’ll need to run . hacking/env-setup again.

---

<div class="post-metadata">

**Author:** ![jdelaporte](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jdelaporte/32/366_2.png) [@jdelaporte](https://forum.ansible.com/u/jdelaporte)\
**Post date:** [March 2, 2016, 3:17pm UTC](https://forum.ansible.com/t/cloned-ansible-from-github-now-i-have-module-object-has-no-attribute-coloer-error/20736/15 "2016-03-02T15:17:07Z")

</div>

Hi Brian,

Thanks! It turns out I had a system installation still hanging around in addition to the github clone. So, I pip uninstalled to remove the system installation of Ansible and now everything works again.
