Yowsup: TypeError: Error when calling the metaclass bases

Created on 19 Sep 2017  路  15Comments  路  Source: tgalal/yowsup

Hi,
I'm getting this error while trying to register phone number

Traceback (most recent call last):
  File "/usr/bin/yowsup-cli", line 5, in <module>
    pkg_resources.run_script('yowsup2==2.5.2', 'yowsup-cli')
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script
    execfile(script_filename, namespace, namespace)
  File "/usr/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 6, in <module>
    from yowsup.env import YowsupEnv
  File "/usr/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/env/__init__.py", line 1, in <module>
    from .env import YowsupEnv
  File "/usr/lib/python2.7/site-packages/yowsup2-2.5.2-py2.7.egg/yowsup/env/env.py", line 15, in <module>
    class YowsupEnv(with_metaclass(YowsupEnvType, object)):
  File "/usr/lib64/python2.7/abc.py", line 87, in __new__
    cls = super(ABCMeta, mcls).__new__(mcls, name, bases, namespace)
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases

Most helpful comment

This is because of https://github.com/benjaminp/six/issues/210
Downgrading six is a temporary workaround

pip install six==1.10

All 15 comments

the same problem

same here

same here

dont use python2.7, change to use python3.X

sudo apt-get install python3-setuptools
sudo python3  setup.py install

thanks @thaihau
this solved the issue for me.

This is because of https://github.com/benjaminp/six/issues/210
Downgrading six is a temporary workaround

pip install six==1.10

same... not solve with python3 and not pip install six==1.10

dont use python2.7, change to use python3.X

sudo apt-get install python3-setuptools
sudo apt-get install python3-pip <-- dev-packages also needed
sudo python3 setup.py install

Works with 2.7

@JackLeo using python 2.7 and six 1.10 solved the problem.

Solved Downgrading six
Thanks @JackLeo

Same issue, solved with

pip install six==1.10

Hi
I've submitted a PR that fixes the compatibility with six >= 1.11 https://github.com/tgalal/yowsup/pull/2379

@thaihau Thanks!

@JackLeo thanks, that did it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

holgerschochwitz picture holgerschochwitz  路  3Comments

thatskriptkid picture thatskriptkid  路  3Comments

rroqueCoddera picture rroqueCoddera  路  3Comments

bzero picture bzero  路  3Comments

gabrieldesousah picture gabrieldesousah  路  4Comments