# Unexpected Exception on Ansible 2.0 after installing VirtualBox 5

**URL:** <https://forum.ansible.com/t/unexpected-exception-on-ansible-2-0-after-installing-virtualbox-5/20208>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [January 14, 2016, 3:39am UTC](https://forum.ansible.com/t/unexpected-exception-on-ansible-2-0-after-installing-virtualbox-5/20208 "2016-01-14T03:39:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![P\_Kieran\_Etienne](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@P\_Kieran\_Etienne](https://forum.ansible.com/u/P_Kieran_Etienne)\
**Post date:** [January 14, 2016, 3:39am UTC](https://forum.ansible.com/t/unexpected-exception-on-ansible-2-0-after-installing-virtualbox-5/20208/1 "2016-01-14T03:39:57Z")

</div>

I’m encountering the following error:

Unexpected Exception: ‘module’ object has no attribute ‘\_vendor’

My environment is:  
Ubuntu 15.10  
Python 2.7  
Ansible 2.0 (via the ppa at [http://ppa.launchpad.net/ansible/ansible/ubuntu](http://ppa.launchpad.net/ansible/ansible/ubuntu))  
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   
from ansible.cli.adhoc import AdHocCLI as mycli  
File “/usr/lib/pymodules/python2.7/ansible/cli/adhoc.py”, line 28, in   
from ansible.executor.task\_queue\_manager import TaskQueueManager  
File “/usr/lib/pymodules/python2.7/ansible/executor/task\_queue\_manager.py”, line 29, in   
from ansible.executor.play\_iterator import PlayIterator  
File “/usr/lib/pymodules/python2.7/ansible/executor/play\_iterator.py”, line 29, in   
from ansible.playbook.block import Block  
File “/usr/lib/pymodules/python2.7/ansible/playbook/ **init**.py”, line 25, in   
from ansible.playbook.play import Play  
File “/usr/lib/pymodules/python2.7/ansible/playbook/play.py”, line 27, in   
from ansible.playbook.base import Base  
File “/usr/lib/pymodules/python2.7/ansible/playbook/base.py”, line 35, in   
from ansible.parsing.dataloader import DataLoader  
File “/usr/lib/pymodules/python2.7/ansible/parsing/dataloader.py”, line 33, in   
from ansible.parsing.vault import VaultLib  
File “/usr/lib/pymodules/python2.7/ansible/parsing/vault/ **init**.py”, line 66, in   
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   
from cryptography.hazmat.backends.interfaces import HashBackend  
File “/usr/lib/python2.7/dist-packages/cryptography/hazmat/backends/ **init**.py”, line 7, in   
import pkg\_resources  
File “/usr/lib/python2.7/dist-packages/pkg\_resources/ **init**.py”, line 90, in   
packaging = pkg\_resources.\_vendor.packaging  
AttributeError: ‘module’ object has no attribute ‘\_vendor’

`

---

<div class="post-metadata">

**Author:** ![James\_Cammarata](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@James\_Cammarata](https://forum.ansible.com/u/James_Cammarata)\
**Post date:** [January 14, 2016, 7:23pm UTC](https://forum.ansible.com/t/unexpected-exception-on-ansible-2-0-after-installing-virtualbox-5/20208/2 "2016-01-14T19:23:11Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![P\_Kieran\_Etienne](https://avatars.discourse-cdn.com/v4/letter/p/a6a055/32.png) [@P\_Kieran\_Etienne](https://forum.ansible.com/u/P_Kieran_Etienne)\
**Post date:** [January 23, 2016, 5:15am UTC](https://forum.ansible.com/t/unexpected-exception-on-ansible-2-0-after-installing-virtualbox-5/20208/3 "2016-01-23T05:15:24Z")

</div>

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.
