ModuleNotFoundError: No module named 'ansible.parsing'

25 views
Skip to first unread message

shenh...@gmail.com

unread,
Jan 28, 2019, 3:10:51 AM1/28/19
to Ansible Project

From what I saw in my environment I got this error when the script wasn't in my root directory.

[root@xxx API]# ./my_ansible.py 
Traceback (most recent call last):   
     File "./my_ansible.py", line 5, in <module>
        from ansible.parsing.dataloader import DataLoader   
     File "/home/xxx/projects/API/ansible.py", line 5, in <module>
ImportError: No module named parsing.dataloader

Once I moved it to /root - it ran fine:

[root@xxx ~]# ./my_ansible.py
[root@xxx ~]#
Reply all
Reply to author
Forward
Message has been deleted
0 new messages