# yum: AttributeError: 'module' object has no attribute 'i18n'

**URL:** <https://forum.ansible.com/t/yum-attributeerror-module-object-has-no-attribute-i18n/30375>\
**Category:** Ansible Project\
**Created:** [May 20, 2019, 10:10am UTC](https://forum.ansible.com/t/yum-attributeerror-module-object-has-no-attribute-i18n/30375 "2019-05-20T10:10:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![christian.tremel](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@christian.tremel](https://forum.ansible.com/u/christian.tremel)\
**Post date:** [May 20, 2019, 10:10am UTC](https://forum.ansible.com/t/yum-attributeerror-module-object-has-no-attribute-i18n/30375/1 "2019-05-20T10:10:30Z")

</div>

hi,

got this error out of nowhere…what’s the problem here?

ansible --version  
ansible 2.7.10  
config file = /etc/ansible/aix/ansible.cfg  
configured module search path = [u’/root/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/lib/python2.7/site-packages/ansible  
executable location = /usr/bin/ansible  
python version = 2.7.5 (default, Mar 26 2019, 22:07:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]

`  
fatal: [AIXHOST]: FAILED! =\> {  
“ansible\_facts”: {  
“pkg\_mgr”: “yum”  
},  
“changed”: false,  
“rc”: 1  
}

MSG:

MODULE FAILURE  
See stdout/stderr for the exact error

MODULE\_STDOUT:

Traceback (most recent call last):  
File “/root/.ansible/tmp/ansible-tmp-1558346846.77-273271480181096/AnsiballZ\_yum.py”, line 113, in   
\_ansiballz\_main()  
File “/root/.ansible/tmp/ansible-tmp-1558346846.77-273271480181096/AnsiballZ\_yum.py”, line 105, in _ansiballz\_main  
invoke\_module(zipped\_mod, temp\_path, ANSIBALLZ\_PARAMS)  
File “/root/.ansible/tmp/ansible-tmp-1558346846.77-273271480181096/AnsiballZ\_yum.py”, line 48, in invoke\_module  
imp.load\_module(‘ **main** ’, mod, module, MOD\_DESC)  
File “/tmp/ansible\_yum\_payload\_3ucq8o/ **main**.py”, line 341, in   
File “/opt/freeware/lib/python2.7/site-packages/yum/ **init**.py”, line 49, in   
\_ = yum.i18n._  
AttributeError: ‘module’ object has no attribute ‘i18n’

MODULE\_STDERR:

Shared connection to 10.0.0.2 closed.

`

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [May 20, 2019, 11:36am UTC](https://forum.ansible.com/t/yum-attributeerror-module-object-has-no-attribute-i18n/30375/2 "2019-05-20T11:36:10Z")

</div>

looks like you typed an option that’s not available. can you share the tasks?

Jonathan Lozada De La Matta on mobile

---

<div class="post-metadata">

**Author:** ![christian.tremel](https://avatars.discourse-cdn.com/v4/letter/c/50afbb/32.png) [@christian.tremel](https://forum.ansible.com/u/christian.tremel)\
**Post date:** [May 20, 2019, 11:47am UTC](https://forum.ansible.com/t/yum-attributeerror-module-object-has-no-attribute-i18n/30375/3 "2019-05-20T11:47:19Z")

</div>

`

# tasks file for manage\_aixtoolbox

- name: gather all aix facts  
aix\_facts:  
options:

- all

- name: check if perzl  
shell: /usr/bin/yum -q repolist | /usr/bin/grep -q perzl  
register: perzl\_repo  
failed\_when: false

- name: fail if on perzl repo  
fail: msg=“still on perzl”  
when: perzl\_repo.rc == 0

- name: backup sudoers file  
copy:  
src: /etc/sudoers  
dest: /etc/sudoers.save  
remote\_src: yes  
backup: yes  
failed\_when: false

- name: make sure packages directory exists  
file:  
path: /opt/freeware/lib/rpm/Packages  
state: directory

- name: generate yum conf from template  
template:  
src: yum.conf\_71.j2  
dest: /opt/freeware/etc/yum/yum.conf  
when: ansible\_facts[“oslevel”][“OS\_Ver”] == “71”

- name: generate yum conf from template  
template:  
src: yum.conf\_72.j2  
dest: /opt/freeware/etc/yum/yum.conf  
when: ansible\_facts[“oslevel”][“OS\_Ver”] == “72”

- name: remove all old repo configs  
file:  
path: /opt/freeware/etc/yum/repos.d/  
state: absent

- name: install common packages  
yum:  
state: present  
name: “{{ package\_list }}”  
update\_cache: yes  
skip\_broken: yes  
allow\_downgrade: yes

- name: restore sudoers file  
copy:  
src: /etc/sudoers.save  
dest: /etc/sudoers  
remote\_src: yes  
failed\_when: false

- name: remove sudoers backup  
file:  
path: /etc/sudoers.save  
state: absent  
failed\_when: false

`
