No module named openstack.common

Bug #1579157 reported by Jtwebman on 2016-05-06
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-novaclient
Undecided
Unassigned

Bug Description

I install the latest python-novaclient using pip and when I run the nova list I get a ERROR (ImportError): No module named openstack.common.

I am on the latest Mac OS.

Here is the full output with debug.

DEBUG (shell:1077) No module named openstack.common
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/novaclient/shell.py", line 1075, in main
    OpenStackComputeShell().main(argv)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/novaclient/shell.py", line 912, in main
    self.extensions = client.discover_extensions(api_version)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/novaclient/client.py", line 753, in discover_extensions
    return [ext.Extension(name, module) for name, module in chain]
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/novaclient/client.py", line 762, in _discover_via_python_path
    module = module_loader.load_module(name)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pkgutil.py", line 246, in load_module
    mod = imp.load_module(fullname, self.file, self.filename, self.etc)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ip_associations_python_novaclient_ext.py", line 16, in <module>
    from novaclient.openstack.common import cliutils as utils
ImportError: No module named openstack.common
ERROR (ImportError): No module named openstack.common

Here is the pip version install info:
pip show python-novaclient
---
Metadata-Version: 2.0
Name: python-novaclient
Version: 4.0.0
Summary: Client library for OpenStack Compute API
Home-page: https://www.openstack.org
Author: OpenStack
Author-email: <email address hidden>
Installer: pip
License: Apache License, Version 2.0
Location: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
Requires: oslo.i18n, oslo.serialization, requests, oslo.utils, iso8601, keystoneauth1, pbr, six, PrettyTable, simplejson, Babel
Classifiers:
  Development Status :: 5 - Production/Stable
  Environment :: Console
  Environment :: OpenStack
  Intended Audience :: Developers
  Intended Audience :: Information Technology
  License :: OSI Approved :: Apache Software License
  Operating System :: OS Independent
  Programming Language :: Python
  Programming Language :: Python :: 2
  Programming Language :: Python :: 2.7
  Programming Language :: Python :: 3
  Programming Language :: Python :: 3.4
Entry-points:
  [console_scripts]
  nova = novaclient.shell:main

pip list
Babel (2.3.4)
debtcollector (1.3.0)
funcsigs (1.0.2)
ip-associations-python-novaclient-ext (0.1)
iso8601 (0.1.11)
keystoneauth1 (2.6.0)
monotonic (1.1)
msgpack-python (0.4.7)
netaddr (0.7.18)
netifaces (0.10.4)
os-diskconfig-python-novaclient-ext (0.1.3)
os-networksv2-python-novaclient-ext (0.25)
os-virtual-interfacesv2-python-novaclient-ext (0.19)
oslo.i18n (3.6.0)
oslo.serialization (2.4.0)
oslo.utils (3.8.0)
pbr (1.9.1)
pip (8.1.1)
positional (1.1.0)
prettytable (0.7.2)
python-novaclient (4.0.0)
pytz (2016.4)
rackspace-auth-openstack (1.3)
rax-default-network-flags-python-novaclient-ext (0.3.2)
rax-scheduled-images-python-novaclient-ext (0.3.1)
requests (2.10.0)
setuptools (18.2)
simplejson (3.8.2)
six (1.10.0)
stevedore (1.12.0)
wrapt (1.10.8)

Jtwebman (jtwebman) on 2016-05-06
description: updated
Jtwebman (jtwebman) on 2016-05-06
description: updated
Jtwebman (jtwebman) wrote :

Ok after researching this and digging through source code it looks like it is actually an issue with the Rackspace extensions. There are pull requests out to already fix this here:

https://github.com/rackerlabs/rax_default_network_flags_python_novaclient_ext/pull/13
https://github.com/rackerlabs/os_virtual_interfacesv2_ext/pull/4
https://github.com/rackerlabs/os_networksv2_python_novaclient_ext/pull/13
https://github.com/rackerlabs/ip_associations_python_novaclient_ext/pull/2

I just made the changes to the files manually to get it working on my local which was novaclient.openstack.common.utils class is now just novaclient.utils if you are getting the same error.

Changed in python-novaclient:
assignee: nobody → venkatamahesh (venkatamaheshkotha)
Changed in python-novaclient:
assignee: venkatamahesh (venkatamaheshkotha) → nobody
melanie witt (melwitt) wrote :

Thanks Jtwebman for updating this and linking the pull requests for the rackspace extension fixes

Changed in python-novaclient:
status: New → Invalid
david harkness (nullserver) wrote :

What's the best way to go about updating this on a mac?

I get the same error, and I'm dead in the water.

IceStorm ➜ core git:(master) ✗ openstack server list
No module named openstack.common

IceStorm ➜ core git:(master) ✗ pip list | grep client
ip-associations-python-novaclient-ext (0.1)
os-client-config (1.18.0)
os-diskconfig-python-novaclient-ext (0.1.3)
os-networksv2-python-novaclient-ext (0.25)
os-virtual-interfacesv2-python-novaclient-ext (0.19)
python-cinderclient (1.8.0)
python-glanceclient (2.0.0)
python-keystoneclient (3.1.0)
python-novaclient (4.0.0)
python-openstackclient (2.5.0)
rackspace-novaclient (1.5)
rax-default-network-flags-python-novaclient-ext (0.3.2)
rax-scheduled-images-python-novaclient-ext (0.3.1)

david harkness (nullserver) wrote :

2 days of fighting with it, I get it working a minute after I ask for help...

Here's what worked for me on my Mac

sudo su -
pip freeze | grep -v "^-e" | xargs pip uninstall -y
exit
pip install python-openstackclient

Good now

Drago (dragorosson) wrote :

For me, this was due to os-networksv2-python-novaclient-ext.

sudo pip uninstall os-networksv2-python-novaclient-ext

How I found out:

I was using the python-openstackclient, but it might show up the same using just novaclient.

openstack --debug server list

Which showed at the bottom of the output:

  File "/Library/Python/2.7/site-packages/os_networksv2_python_novaclient_ext.py", line 16, in <module>
    from novaclient.openstack.common import cliutils as utils
ImportError: No module named openstack.common

Sure enough:

$ pip freeze | grep ext
os-networksv2-python-novaclient-ext==0.25

So, again, I ran this to fix it:

sudo pip uninstall os-networksv2-python-novaclient-ext

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers