New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'module' object has no attribute 'add_metaclass' #449

lindemann09 opened this Issue Sep 22, 2014 · 5 comments


None yet
5 participants
Copy link

lindemann09 commented Sep 22, 2014


Glue is crashing on startup if running under Ubuntu 12.04 LTS (see below). All dependencies are installed.

I couldn't see a reason to install an additional third-party Python environment such as Anaconda that might interfere with my current stable Python ecosystem. Unfortunately, the website is not clear about whether Anaconda is a dependency or, if not, why it is recommended?


~$ glue
Traceback (most recent call last):
  File "/usr/local/bin/glue", line 9, in <module>
    load_entry_point('glueviz==0.3.0', 'console_scripts', 'glue')()
  File "/usr/local/lib/python2.7/dist-packages/glue/", line 226, in main
  File "/usr/local/lib/python2.7/dist-packages/glue/", line 171, in start_glue
    ga = GlueApplication(session=session)
  File "/usr/local/lib/python2.7/dist-packages/glue/qt/", line 195, in __init__
  File "/usr/local/lib/python2.7/dist-packages/glue/qt/", line 505, in _create_actions
    if len(exporters) > 0:
  File "/usr/local/lib/python2.7/dist-packages/glue/", line 62, in __len__
    return len(self.members)
  File "/usr/local/lib/python2.7/dist-packages/glue/", line 44, in members
    self._members = self.default_members() + self._members
  File "/usr/local/lib/python2.7/dist-packages/glue/", line 111, in default_members
    import glue.plugins  # discover plugins
  File "/usr/local/lib/python2.7/dist-packages/glue/plugins/", line 2, in <module>
    from . import export_plotly
  File "/usr/local/lib/python2.7/dist-packages/glue/plugins/", line 5, in <module>
    from plotly import plotly
  File "/usr/local/lib/python2.7/dist-packages/plotly/", line 31, in <module>
    from plotly import plotly, graph_objs, tools, utils
  File "/usr/local/lib/python2.7/dist-packages/plotly/plotly/", line 10, in <module>
    from . plotly import (
  File "/usr/local/lib/python2.7/dist-packages/plotly/plotly/", line 29, in <module>
    from plotly import tools
  File "/usr/local/lib/python2.7/dist-packages/plotly/", line 21, in <module>
    from . graph_objs import graph_objs
  File "/usr/local/lib/python2.7/dist-packages/plotly/graph_objs/", line 12, in <module>
    from . graph_objs import (
  File "/usr/local/lib/python2.7/dist-packages/plotly/graph_objs/", line 251, in <module>
AttributeError: 'module' object has no attribute 'add_metaclass'

This comment has been minimized.

Copy link

ChrisBeaumont commented Sep 22, 2014

Hi Oliver,

Anaconda isn't a dependency, just a bundle of python libraries that is an easy way to install Glue's dependencies. So you don't have to use it if you don't want.

It looks like plotly might be expecting a more recent version of six than what you have. What happens when you run these lines?

import six
print six.__version__

import plotly
print plotly.__version__

My guess is that you might need to run pip install --upgrade six to get plotly to import, and then glue should startup for you


This comment has been minimized.

Copy link

lindemann09 commented Sep 23, 2014

That's it. The update to six version 1.8 fixed the problem. Ubuntu 12.04 includes version 1.1. Maybe adding the required six version to the dependency is helpful for others.

(The problem was that with six 1.1.0 plotly could not be import correctly.)

Thanks for your quick response.


This comment has been minimized.

Copy link

kobigi commented Jan 30, 2016

on centos 7 i had the same error, suggested solution as is above failed (don' know why)
Finally uninstalling and installing worked and i could continue devstack deployment
#sudo pip uninstall six
#sudo pip install six


This comment has been minimized.

Copy link

nallagondu commented Aug 13, 2018

AttributeError: 'module' object has no attribute 'add_metaclass'

Can any one help me to resolve it
Problem while running Ansible :

]# ansible -m all ping
ERROR! Unexpected Exception, this is probably a bug: 'module' object has no attribute

the full traceback was:

Traceback (most recent call last):
File "/usr/bin/ansible", line 97, in
mycli = getattr(import("ansible.cli.%s" % sub, fromlist=[myclass]), myclass)
File "/usr/lib/python2.7/site-packages/ansible/cli/", line 38, in
from ansible.inventory.manager import InventoryManager
File "/usr/lib/python2.7/site-packages/ansible/inventory/", line 33, in
from ansible.plugins.loader import inventory_loader
File "/usr/lib/python2.7/site-packages/ansible/plugins/", line 22, in
from ansible.parsing.utils.yaml import from_yaml
File "/usr/lib/python2.7/site-packages/ansible/parsing/utils/", line 17, in
from ansible.parsing.yaml.loader import AnsibleLoader
File "/usr/lib/python2.7/site-packages/ansible/parsing/yaml/", line 30, in
from ansible.parsing.yaml.constructor import AnsibleConstructor
File "/usr/lib/python2.7/site-packages/ansible/parsing/yaml/", line 29, in
from ansible.parsing.vault import VaultLib
File "/usr/lib/python2.7/site-packages/ansible/parsing/vault/", line 46, in
from cryptography.hazmat.primitives import hashes, padding
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/primitives/", line 15, in
from cryptography.hazmat.backends.interfaces import HashBackend
File "/usr/lib64/python2.7/site-packages/cryptography/hazmat/backends/", line 12, in
AttributeError: 'module' object has no attribute 'add_metaclass'


This comment has been minimized.

Copy link

astrofrog commented Aug 20, 2018

@nallagondu - try updating the six package:

pip install six --upgrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment