# Module error

**URL:** <https://forum.ansible.com/t/module-error/38674>\
**Category:** Ansible Project\
**Tags:** awx\
**Created:** [January 31, 2024, 7:37pm UTC](https://forum.ansible.com/t/module-error/38674 "2024-01-31T19:37:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thirumalairaja](https://avatars.discourse-cdn.com/v4/letter/t/c6cbf5/32.png) [@thirumalairaja](https://forum.ansible.com/u/thirumalairaja)\
**Post date:** [January 31, 2024, 7:37pm UTC](https://forum.ansible.com/t/module-error/38674/1 "2024-01-31T19:37:00Z")

</div>

I’m using AWX, and i have custom module i am facing below error even i have installed ansible and requests on the delegated host

error:{  
“module\_stdout”: “/etc/profile.d/lang.sh: line 19: warning: setlocale: LC\_CTYPE: cannot change locale (C.UTF-8)\r\nTraceback (most recent call last):\r\n File "/home/efv-ansible/.ansible/tmp/ansible-tmp-1706729474.2440329-119-117030014921145/AnsiballZ\_registerconsol.py", line 100, in \r\n \_ansiballz\_main()\r\n File "/home/efv-ansible/.ansible/tmp/ansible-tmp-1706729474.2440329-119-117030014921145/AnsiballZ\_registerconsol.py", line 92, in \_ansiballz\_main\r\n invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)\r\n File "/home/efv-ansible/.ansible/tmp/ansible-tmp-1706729474.2440329-119-117030014921145/AnsiballZ\_registerconsol.py", line 41, in invoke\_module\r\n run\_name=‘ **main** ’, alter\_sys=True)\r\n File "/usr/lib64/python2.7/runpy.py", line 176, in run\_module\r\n fname, loader, pkg\_name)\r\n File "/usr/lib64/python2.7/runpy.py", line 82, in \_run\_module\_code\r\n mod\_name, mod\_fname, mod\_loader, pkg\_name)\r\n File "/usr/lib64/python2.7/runpy.py", line 72, in \_run\_code\r\n exec code in run\_globals\r\n File "/tmp/ansible\_registerconsol\_payload\_cHjRE5/ansible\_registerconsol\_payload.zip/ansible/modules/registerconsol.py", line 46, in \r\nImportError: No module named requests\r\n”,  
“module\_stderr”: “Shared connection to [ansible-as-1d.sys.comcast.net](http://ansible-as-1d.sys.comcast.net) closed.\r\n”,  
“msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”,  
“rc”: 1,  
“\_ansible\_no\_log”: false,  
“changed”: false,  
“\_ansible\_delegated\_vars”: {  
“ansible\_host”: “[ansible-as-1d.sys.comcast.net](http://ansible-as-1d.sys.comcast.net)”,  
“ansible\_port”: null,  
“ansible\_user”: “efv-ansible”  
}  
}

- name: Telegraf host register with Prometheus  
registerconsol:  
Name: “{{ansible\_host}}”  
ip: “{{ansible\_ip}}”  
curl: “{{consul\_register\_url}}”  
token: “{{consul\_key}}”  
function: “{{ansible\_function}}”  
location: “{{ansible\_location}}”  
itrc\_component: “{{ansible\_itrc\_component\_wthspc}}”  
itrc\_id: “{{ansible\_itrc\_cmp\_id}}”  
new: True  
delegate\_to: [ansible-as-1d.sys.comcast.net](http://ansible-as-1d.sys.comcast.net)  
when: (location is not defined and function is not defined) or (ansible\_location in location and ansible\_function in function and Version in version) or (location is not defined and ansible\_function in function and Version in version) or (function is not defined and ansible\_location in location and Version in version)  
tags:
- Prometheus\_Register
