# Example to customize modules errors

**URL:** <https://forum.ansible.com/t/example-to-customize-modules-errors/16648>\
**Category:** Ansible Project\
**Created:** [October 30, 2014, 6:58pm UTC](https://forum.ansible.com/t/example-to-customize-modules-errors/16648 "2014-10-30T18:58:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tiglath](https://avatars.discourse-cdn.com/v4/letter/t/df705f/32.png) [@Tiglath](https://forum.ansible.com/u/Tiglath)\
**Post date:** [October 30, 2014, 6:58pm UTC](https://forum.ansible.com/t/example-to-customize-modules-errors/16648/1 "2014-10-30T18:58:41Z")

</div>

I followed the docs example to add a module as with the time.py example.

So I have:

---

<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:** [October 30, 2014, 7:07pm UTC](https://forum.ansible.com/t/example-to-customize-modules-errors/16648/2 "2014-10-30T19:07:50Z")

</div>

Since “time” is part of the Python standard library and it is imported from various places within ansible you should not have a module named time.py since puthon will try to use that file as the file to satisfy “import time”.

This wouldn’t have been a problem before modules had .py extensions. I imagine the docs should probably be updated to name this something other than time.py

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [October 30, 2014, 8:56pm UTC](https://forum.ansible.com/t/example-to-customize-modules-errors/16648/3 "2014-10-30T20:56:49Z")

</div>

Yep, that’s a good suggestion.

Can you either please file a ticket on [github.com/ansible/ansible](http://github.com/ansible/ansible) or submit a pull request that changes the docs (.rst files in the code tree) to say something like “timecheck” ?

I think this ordinarily won’t happen anyway, but the module happened to be in your PYTHON\_PATH. Usually this wouldn’t be the case but it would be nice to step around the possible confusion for others finding this in the dev docs.

Appreciate the heads up!
