# Traceback with the setup module on SLES 10 SP2 host

**URL:** <https://forum.ansible.com/t/traceback-with-the-setup-module-on-sles-10-sp2-host/12800>\
**Category:** Ansible Project\
**Created:** [May 13, 2013, 3:08pm UTC](https://forum.ansible.com/t/traceback-with-the-setup-module-on-sles-10-sp2-host/12800 "2013-05-13T15:08:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien\_Tognazzi](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Julien\_Tognazzi](https://forum.ansible.com/u/Julien_Tognazzi)\
**Post date:** [May 13, 2013, 3:08pm UTC](https://forum.ansible.com/t/traceback-with-the-setup-module-on-sles-10-sp2-host/12800/1 "2013-05-13T15:08:52Z")

</div>

Hi,

It seems that since ansible 1.1, the setup module failed on old SLES 10 SP2 host.

I have the following traceback:

fatal: [myhost] =\> failed to parse:  
Traceback (most recent call last):  
File “/home/user/.ansible/tmp/ansible-1368456661.8-263287084724264/setup”, line 2587, in ?  
main()  
File “/home/user/.ansible/tmp/ansible-1368456661.8-263287084724264/setup”, line 1689, in main  
data = run\_setup(module)  
File “/home/user/.ansible/tmp/ansible-1368456661.8-263287084724264/setup”, line 1634, in run\_setup  
facts = ansible\_facts()  
File “/home/user/.ansible/tmp/ansible-1368456661.8-263287084724264/setup”, line 1624, in ansible\_facts  
facts.update(Hardware().populate())  
File “/home/user/.ansible/tmp/ansible-1368456661.8-263287084724264/setup”, line 408, in populate  
self.get\_device\_facts()  
File “/home/user/.ansible/tmp/ansible-1368456661.8-263287084724264/setup”, line 629, in get\_device\_facts  
for folder in os.listdir(sysdir + “/holders”):  
OSError: [Errno 2] No such file or directory: ‘/sys/block/sdb/holders’

I tried debugging with the test-module but it fails with

$ test-module -m …/library/system/setup  
Traceback (most recent call last):  
File “./test-module”, line 36, in ?  
import ansible.utils as utils  
File “/home/user/ansible/lib/ansible/utils/ **init**.py”, line 695  
with warnings.catch\_warnings():

^  
SyntaxError: invalid syntax

I also tested with the latest checkout and I have the same error…

Thanks for any help on this.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 13, 2013, 3:15pm UTC](https://forum.ansible.com/t/traceback-with-the-setup-module-on-sles-10-sp2-host/12800/2 "2013-05-13T15:15:44Z")

</div>

You need Python 2.6 in order to use the ./test-module script because it’s using Python 2.6 code in utils. That is expected.

Looks like we just need to modify the setup module to allow for that path to not exist, which is easy enough.

---

<div class="post-metadata">

**Author:** ![Julien\_Tognazzi](https://avatars.discourse-cdn.com/v4/letter/j/b38774/32.png) [@Julien\_Tognazzi](https://forum.ansible.com/u/Julien_Tognazzi)\
**Post date:** [May 13, 2013, 3:23pm UTC](https://forum.ansible.com/t/traceback-with-the-setup-module-on-sles-10-sp2-host/12800/3 "2013-05-13T15:23:48Z")

</div>

> You need Python 2.6 in order to use the ./test-module script because it’s using Python 2.6 code in utils. That is expected.

I thought so…

> Looks like we just need to modify the setup module to allow for that path to not exist, which is easy enough.

Should I file an issue ?

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [May 13, 2013, 5:40pm UTC](https://forum.ansible.com/t/traceback-with-the-setup-module-on-sles-10-sp2-host/12800/4 "2013-05-13T17:40:43Z")

</div>

yes, please!
