Unexpected Exception on Ansible 2.0 after installing VirtualBox 5

642 views
Skip to first unread message

P. Kieran Etienne

unread,
Jan 14, 2016, 9:00:51 AM1/14/16
to Ansible Project
I'm encountering the following error:

Unexpected Exception: 'module' object has no attribute '_vendor'

My environment is:
Ubuntu 15.10
Python 2.7
VirtualBox 5.0.10

After performing an OS update today, Ansible moved from 1.9.4 to 2.0. At that point I started encountering the error. Uninstalling and reinstalling Ansible did not resolve the error. Uninstalling Python and Ansible, then reinstalling Ansible (via apt-get) did resolve the error. However, after reinstalling VirtualBox 5.0.10 (along with its many Python related dependencies), the error resurfaced.

For the moment, I'm sure I'll attempt to lock Ansible to 1.9.4, but I'm interested if anyone has feedback related to why this may be occurring and what I may be able to do to resolve the issue.

Here's the full stack trace:
(the log file is writable by the user, which makes for a puzzling warning message as well).

user@machine:/etc/ansible$ ansible --version
[WARNING]: log file at /var/log/ansible.log is not writeable, aborting

Unexpected Exception: 'module' object has no attribute '_vendor'
the full traceback was
:

Traceback (most recent call last):
 
File "/usr/bin/ansible", line 74, in <module>
   
from ansible.cli.adhoc import AdHocCLI as mycli
 
File "/usr/lib/pymodules/python2.7/ansible/cli/adhoc.py", line 28, in <module>
   
from ansible.executor.task_queue_manager import TaskQueueManager
 
File "/usr/lib/pymodules/python2.7/ansible/executor/task_queue_manager.py", line 29, in <module>
   
from ansible.executor.play_iterator import PlayIterator
 
File "/usr/lib/pymodules/python2.7/ansible/executor/play_iterator.py", line 29, in <module>
   
from ansible.playbook.block import Block
 
File "/usr/lib/pymodules/python2.7/ansible/playbook/__init__.py", line 25, in <module>
   
from ansible.playbook.play import Play
 
File "/usr/lib/pymodules/python2.7/ansible/playbook/play.py", line 27, in <module>
   
from ansible.playbook.base import Base
 
File "/usr/lib/pymodules/python2.7/ansible/playbook/base.py", line 35, in <module>
   
from ansible.parsing.dataloader import DataLoader
 
File "/usr/lib/pymodules/python2.7/ansible/parsing/dataloader.py", line 33, in <module>
   
from ansible.parsing.vault import VaultLib
 
File "/usr/lib/pymodules/python2.7/ansible/parsing/vault/__init__.py", line 66, in <module>
   
from cryptography.hazmat.primitives.hashes import SHA256 as c_SHA256
 
File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/primitives/hashes.py", line 15, in <module>
   
from cryptography.hazmat.backends.interfaces import HashBackend
 
File "/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/__init__.py", line 7, in <module>
   
import pkg_resources
 
File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 90, in <module>
    packaging
= pkg_resources._vendor.packaging
AttributeError: 'module' object has no attribute '_vendor'



James Cammarata

unread,
Jan 14, 2016, 2:23:19 PM1/14/16
to ansible...@googlegroups.com
Hi, this is caused by python-setuptools not being installed. We'll be fixing this in the packaging deps, but for now just install that and you should be good to go.

Thanks!

James Cammarata
Director, Ansible Core Engineering
github: jimi-c

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/16b1c8a2-3454-4d11-bd5d-1b0afa6d064b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

P. Kieran Etienne

unread,
Jan 23, 2016, 12:15:25 AM1/23/16
to Ansible Project
Hi James,

Many thanks for your reply, it did help resolve the issue I was encountering and it looks as though it's already been taken care of in the 2.0.0.2 release. Thanks again.

 - Kieran E.
Reply all
Reply to author
Forward
0 new messages