Ask Your Question
0

[Juno] devstack install failure: AttributeError: 'module' object has no attribute 'wraps'

asked 2014-12-16 02:43:06 -0500

tvbinstinct gravatar image

updated 2014-12-16 12:03:27 -0500

smaffulli gravatar image

The error was thrown out when run:

/opt/stack/keystone/bin/keystone-manage db_syn

Traceback (most recent call last):
  File "/opt/stack/keystone/bin/keystone-manage", line 30, in <module>
    from keystone import cli
  File "/opt/stack/keystone/keystone/cli.py", line 31, in <module>
    from keystone import token
  File "/opt/stack/keystone/keystone/token/__init__.py", line 15, in <module>
    from keystone.token import controllers  # noqa
  File "/opt/stack/keystone/keystone/token/controllers.py", line 31, in <module>
    from keystone.token import provider
  File "/opt/stack/keystone/keystone/token/provider.py", line 37, in <module>
    from keystone.token import persistence
  File "/opt/stack/keystone/keystone/token/persistence/__init__.py", line 13, in <module>
    from keystone.token.persistence.core import *  # noqa
  File "/opt/stack/keystone/keystone/token/persistence/core.py", line 44, in <module>
    class PersistenceManager(manager.Manager):
  File "/opt/stack/keystone/keystone/token/persistence/core.py", line 58, in PersistenceManager
    what='token_api.unique_id')
  File "/opt/stack/keystone/keystone/openstack/common/versionutils.py", line 128, in __call__
    @six.wraps(func_or_cls)
AttributeError: 'module' object has no attribute 'wraps'

Looks like something related to package six. But I have the latest installed:

$ pip show six
---
Name: six
Version: 1.8.0
Location: /usr/local/lib/python2.7/dist-packages
Requires:
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
3

answered 2014-12-16 02:59:10 -0500

tvbinstinct gravatar image

It turns out that I have two versions of package six existing in the system.

version 1.5.2 at /usr/lib/python2.7/dist-packages

and

version 1.8.0 at /usr/local/lib/python2.7/dist-packages

Somehow version 1.5.2 is the one used and thus the AttributeError. I can fix the install by removing six.* from /usr/lib/python2.7/dist-packages/

Don't know whether /usr/lib/ or /usr/local/lib/ is used. It's probably a general python problem.

My env is Ubuntu Desktop 14.04

edit flag offensive delete link more

Comments

1

Got a little bit deeper on this. My /usr/local/lib/python2.7/dist-packages/easy-install.pth contains /usr/lib/python2.7/dist-packages in it. I will cause the issue I saw but don't know how it got there.

tvbinstinct gravatar imagetvbinstinct ( 2014-12-16 04:16:52 -0500 )edit

Saw same issue on my setup as tvbinstinct. Thanks for posting what you found here.

Shreyansh gravatar imageShreyansh ( 2015-02-11 02:20:51 -0500 )edit
2

answered 2016-12-21 16:16:01 -0500

Edson Barbosa gravatar image

I get the error bellow 'no attribute version' trying to install mitaka devstack on ubuntu 16.04

attributeError: 'module' object has no attribute '__version__'

work around:

edit the file /usr/local/lib/python2.7/dist-packages/openstack/session.py and remove the .__version__ at line 29.

DEFAULT_USER_AGENT = "openstacksdk/%s" % openstack.__version__

DEFAULT_USER_AGENT = "openstacksdk/%s" % openstack

edit flag offensive delete link more

Comments

Edson Barbosa ! I have verified your workaround and it worked well to me. Thanks

Rickyhai gravatar imageRickyhai ( 2017-01-04 00:54:33 -0500 )edit
1

answered 2014-12-16 03:58:02 -0500

kini gravatar image

This problem is solved to remove six using apt-get

sudo apt-get autoremove six

and run ./stack.sh

edit flag offensive delete link more

Comments

Or on 14.04:

sudo apt-get autoremove python-six
Rushi Agrawal gravatar imageRushi Agrawal ( 2015-06-04 05:38:53 -0500 )edit
0

answered 2014-12-16 06:29:02 -0500

Bharath gravatar image

Have a look at this, it resolved the same issue I had earlier.

https://bugs.launchpad.net/keystone/+bug/1378270/comments/7

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-12-16 02:43:06 -0500

Seen: 10,933 times

Last updated: Dec 16 '14