# Generating html module docs locally?

**URL:** <https://forum.ansible.com/t/generating-html-module-docs-locally/23756>\
**Category:** Ansible Developer\
**Created:** [February 17, 2017, 7:09am UTC](https://forum.ansible.com/t/generating-html-module-docs-locally/23756 "2017-02-17T07:09:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lorin\_Hochstein2](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lorin_hochstein2/32/10614_2.png) [@Lorin\_Hochstein2](https://forum.ansible.com/u/Lorin_Hochstein2)\
**Post date:** [February 17, 2017, 7:09am UTC](https://forum.ansible.com/t/generating-html-module-docs-locally/23756/1 "2017-02-17T07:09:45Z")

</div>

I wanted to take a stab at [https://github.com/ansible/ansible/issues/21556](https://github.com/ansible/ansible/issues/21556). I tried doing “make webdocs” against devel (7bf56cee), and got the following error:

rendering: include\_role  
Traceback (most recent call last):  
File “…/…/hacking/module\_formatter.py”, line 487, in   
main()  
File “…/…/hacking/module\_formatter.py”, line 474, in main  
result = process\_module(modname, options, env, template, outputname, module\_map, aliases)  
File “…/…/hacking/module\_formatter.py”, line 327, in process\_module  
raise AnsibleError(“Failed to render doc for %s: %s” % (fname, str(e)))  
ansible.errors.AnsibleError: Failed to render doc for …/…/lib/ansible/modules/core/utilities/logic/include\_role.py: Could not process ({u"As with C(include) this task can be static or dynamic, If static it implies that it won’t need templating nor loops nor conditionals and will show included tasks in the --list options. Ansible will try to autodetect what is needed, but you can set `static": u'yes|no` at task level to control this.'}) : expected string or buffer  
make[1]: \*\*\* [modules] Error 1  
make: \*\*\* [webdocs] Error 2

Anybody have any insight as to why this might fail locally? I’m running on macOS.

Lorin

---

<div class="post-metadata">

**Author:** ![alikins](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@alikins](https://forum.ansible.com/u/alikins)\
**Post date:** [February 17, 2017, 2:58pm UTC](https://forum.ansible.com/t/generating-html-module-docs-locally/23756/2 "2017-02-17T14:58:12Z")

</div>

If you are working against the devel branch, then I suspect you have  
stale lib/ansible/module/core and lib/ansible/module/extra dirs.

Failed to render doc for  
../../lib/ansible/modules/core/utilities/logic/include\_role.py

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^ there is no /core/ path in devel any more

So likely trying to render docs for an older module and failing.

---

<div class="post-metadata">

**Author:** ![Lorin\_Hochstein2](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/lorin_hochstein2/32/10614_2.png) [@Lorin\_Hochstein2](https://forum.ansible.com/u/Lorin_Hochstein2)\
**Post date:** [February 18, 2017, 4:58am UTC](https://forum.ansible.com/t/generating-html-module-docs-locally/23756/3 "2017-02-18T04:58:03Z")

</div>

Yup, that was it. I had some stale dirs that were being masked by .gitignore. It’s working now. Thanks for the help.

Lorin
