# Trouble integrating custom module\_utils module

**URL:** <https://forum.ansible.com/t/trouble-integrating-custom-module-utils-module/29437>\
**Category:** Ansible Project\
**Created:** [January 14, 2019, 10:00pm UTC](https://forum.ansible.com/t/trouble-integrating-custom-module-utils-module/29437 "2019-01-14T22:00:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrei\_Pashkin](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Andrei\_Pashkin](https://forum.ansible.com/u/Andrei_Pashkin)\
**Post date:** [January 14, 2019, 10:00pm UTC](https://forum.ansible.com/t/trouble-integrating-custom-module-utils-module/29437/1 "2019-01-14T22:00:17Z")

</div>

Hello!

I tried to write a custom module\_utils module, I set up everything according to the docs, but for some reason I get an error:

> Skipping plugin (…) as it seems to be invalid: No module named …

I’ve isolated the problem in a small project:  
[https://github.com/AndreiPashkin/ansible-test](https://github.com/AndreiPashkin/ansible-test)

To reproduce the issue it’s enough to have Ansible installed and then execute “run.sh”

Can someone please look into it?

---

<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:** [January 14, 2019, 10:23pm UTC](https://forum.ansible.com/t/trouble-integrating-custom-module-utils-module/29437/2 "2019-01-14T22:23:51Z")

</div>

We do not currently support importing custom module\_utils from anything other than a module. As such, no other custom plugin types can import from a custom module\_utils.

See [https://github.com/ansible/ansible/issues/28770](https://github.com/ansible/ansible/issues/28770)

---

<div class="post-metadata">

**Author:** ![Andrei\_Pashkin](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Andrei\_Pashkin](https://forum.ansible.com/u/Andrei_Pashkin)\
**Post date:** [January 15, 2019, 4:10am UTC](https://forum.ansible.com/t/trouble-integrating-custom-module-utils-module/29437/3 "2019-01-15T04:10:31Z")

</div>

That makes it clear, thanks a lot!

---

<div class="post-metadata">

**Author:** ![Andrei\_Pashkin](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@Andrei\_Pashkin](https://forum.ansible.com/u/Andrei_Pashkin)\
**Post date:** [January 19, 2019, 6:36am UTC](https://forum.ansible.com/t/trouble-integrating-custom-module-utils-module/29437/4 "2019-01-19T06:36:49Z")

</div>

If someone having the same problem - I’ve found a workaround. I just use imp.find\_module()/imp.load\_module()functions from the standard library to load the module with shared code into a plugin module.
