# Inventory plugin error

**URL:** <https://forum.ansible.com/t/inventory-plugin-error/27706>\
**Category:** Ansible Developer\
**Created:** [June 5, 2018, 9:29am UTC](https://forum.ansible.com/t/inventory-plugin-error/27706 "2018-06-05T09:29:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Antoine\_Barbare](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@Antoine\_Barbare](https://forum.ansible.com/u/Antoine_Barbare)\
**Post date:** [June 5, 2018, 9:29am UTC](https://forum.ansible.com/t/inventory-plugin-error/27706/1 "2018-06-05T09:29:38Z")

</div>

Hello!

I wanted to use the Scaleway inventory plugin to launch my playbook but I encounter an error with Ansible 2.6.

~ $ ansible-inventory -vvv --list -i scaleway\_inventory.yml  
ansible-inventory 2.6.0.dev0  
config file = /Users/abarbare/.ansible.cfg  
configured module search path = [u’/Users/abarbare/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/local/lib/python2.7/site-packages/ansible  
executable location = /usr/local/bin/ansible-inventory  
python version = 2.7.15 (default, May 1 2018, 16:44:08) [GCC 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.1)]  
Using /Users/abarbare/.ansible.cfg as config file  
ERROR! Unexpected Exception, this is probably a bug: ‘InventoryModule’ object has no attribute ‘\_load\_name’  
the full traceback was:

Traceback (most recent call last):  
File “/usr/local/bin/ansible-inventory”, line 118, in   
exit\_code = cli.run()  
File “/usr/local/lib/python2.7/site-packages/ansible/cli/inventory.py”, line 136, in run  
self.loader, self.inventory, self.vm = self.\_play\_prereqs(self.options)  
File “/usr/local/lib/python2.7/site-packages/ansible/cli/ **init**.py”, line 806, in \_play\_prereqs  
inventory = InventoryManager(loader=loader, sources=options.inventory)  
File “/usr/local/lib/python2.7/site-packages/ansible/inventory/manager.py”, line 145, in **init**  
self.parse\_sources(cache=True)  
File “/usr/local/lib/python2.7/site-packages/ansible/inventory/manager.py”, line 197, in parse\_sources  
self.\_setup\_inventory\_plugins()  
File “/usr/local/lib/python2.7/site-packages/ansible/inventory/manager.py”, line 184, in \_setup\_inventory\_plugins  
plugin = inventory\_loader.get(name)  
File “/usr/local/lib/python2.7/site-packages/ansible/plugins/loader.py”, line 397, in get  
obj = obj(\*args, \*\*kwargs)  
File “/usr/local/lib/python2.7/site-packages/ansible/plugins/inventory/scaleway.py”, line 85, in **init**  
self.token = self.get\_option(“oauth\_token”)  
File “/usr/local/lib/python2.7/site-packages/ansible/plugins/ **init**.py”, line 58, in get\_option  
option\_value = C.config.get\_config\_value(option, plugin\_type=get\_plugin\_class(self), plugin\_name=self.\_load\_name, variables=hostvars)  
AttributeError: ‘InventoryModule’ object has no attribute ‘\_load\_name’

The **init**.py file has been modified on November [https://github.com/ansible/ansible/commit/23f8833e8745f01b490a6e12dd0f3e946d89654f](https://github.com/ansible/ansible/commit/23f8833e8745f01b490a6e12dd0f3e946d89654f)  
Do you have some clue on the source of the issue?

Thanks,

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [June 7, 2018, 2:42pm UTC](https://forum.ansible.com/t/inventory-plugin-error/27706/2 "2018-06-07T14:42:59Z")

</div>

I don’t have Scaleway to test with but I think if you remove this line: [https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/scaleway.py#L85](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/scaleway.py#L85) and add it here instead [https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/scaleway.py#L149](https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/inventory/scaleway.py#L149) it will work. The options are set in \_read\_config\_data.

---

<div class="post-metadata">

**Author:** ![remyleone](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/remyleone/32/5200_2.png) [@remyleone](https://forum.ansible.com/u/remyleone)\
**Post date:** [June 18, 2018, 12:30pm UTC](https://forum.ansible.com/t/inventory-plugin-error/27706/3 "2018-06-18T12:30:41Z")

</div>

A PR fixes this problem: [https://github.com/ansible/ansible/pull/41259](https://github.com/ansible/ansible/pull/41259)
