# Module "include\_vars" fails with when using "file" parameter

**URL:** <https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22352>\
**Category:** Ansible Project\
**Created:** [August 22, 2016, 10:04pm UTC](https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22352 "2016-08-22T22:04:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Thommen](https://avatars.discourse-cdn.com/v4/letter/f/7feea3/32.png) [@Frank\_Thommen](https://forum.ansible.com/u/Frank_Thommen)\
**Post date:** [August 22, 2016, 10:04pm UTC](https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22352/1 "2016-08-22T22:04:42Z")

</div>

Hi,

when using the include\_module with the "file" parameter, it fails with

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AttributeError: 'NoneType' object has no attribute 'startswith'.

This works fine:

----- testmyvars\_1.yml -----------

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [February 10, 2017, 3:19am UTC](https://forum.ansible.com/t/module-include-vars-fails-with-when-using-file-parameter/22352/2 "2017-02-10T03:19:45Z")

</div>

that parameter got added in 2.2, which you are using, but the error  
seems to be from trying to use it in an older version.
