yowsup icon indicating copy to clipboard operation
yowsup copied to clipboard

yowsup-cli problem

Open Pedro-H-Fialho opened this issue 11 years ago • 10 comments

Getting this when I try to run yowsup-cli after the 2.0 installation (Seems to be caused by the import of 'pkg_resources' or 'symbol_database')

root@xakax:/home/xakax/tmp/yowsup-master# yowsup-cli Traceback (most recent call last): File "/usr/local/bin/yowsup-cli", line 4, in import('pkg_resources').run_script('yowsup2==2.0.53', 'yowsup-cli') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1445, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.0.53-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 6, in

File "build/bdist.linux-x86_64/egg/yowsup/demos/cli/init.py", line 1, in File "build/bdist.linux-x86_64/egg/yowsup/demos/cli/stack.py", line 2, in File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/init.py", line 1, in File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 3, in File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.1-py2.7.egg/axolotl/util/keyhelper.py", line 3, in File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.1-py2.7.egg/axolotl/identitykeypair.py", line 1, in File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.1-py2.7.egg/axolotl/state/storageprotos.py", line 9, in ImportError: cannot import name symbol_database root@xakax:/home/xakax/tmp/yowsup-master# ls build dist LICENSE README.md setup.py yowsup yowsup2.egg-info yowsup-cli root@xakax:/home/xakax/tmp/yowsup-master# clear  root@xakax:/home/xakax/tmp/yowsup-master# yowsup-cli Traceback (most recent call last): File "/usr/local/bin/yowsup-cli", line 4, in import('pkg_resources').run_script('yowsup2==2.0.53', 'yowsup-cli') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1445, in run_script exec(script_code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.0.53-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 6, in

File "build/bdist.linux-x86_64/egg/yowsup/demos/cli/init.py", line 1, in File "build/bdist.linux-x86_64/egg/yowsup/demos/cli/stack.py", line 2, in File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/init.py", line 1, in File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 3, in File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.1-py2.7.egg/axolotl/util/keyhelper.py", line 3, in File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.1-py2.7.egg/axolotl/identitykeypair.py", line 1, in File "/usr/local/lib/python2.7/dist-packages/python_axolotl-0.1.1-py2.7.egg/axolotl/state/storageprotos.py", line 9, in ImportError: cannot import name symbol_database

Pedro-H-Fialho avatar Jan 07 '15 17:01 Pedro-H-Fialho

@XaKaX did it work?

tgalal avatar Jan 08 '15 16:01 tgalal

I'm having the same problem... I manage to register my phone but when I try to use any other feature form "yowsup-cli" I got an "ImportError"

yowsup-cli demos --yowsup --login 55XXXXXXXXXXX:PASSWORD
Traceback (most recent call last):
  File "/usr/local/bin/yowsup-cli", line 4, in <module>
    __import__('pkg_resources').run_script('yowsup2==2.2.15', 'yowsup-cli')
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 696, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1621, in run_script
    exec(script_code, namespace, namespace)
  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.2.15-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 304, in <module>

  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.2.15-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 223, in process

  File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.2.15-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 243, in startCmdline

  File "build/bdist.linux-x86_64/egg/yowsup/demos/cli/__init__.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/yowsup/demos/cli/stack.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/yowsup/stacks/__init__.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/yowsup/stacks/yowstack.py", line 21, in <module>
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/__init__.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/yowsup/layers/axolotl/layer.py", line 3, in <module>
  File "build/bdist.linux-x86_64/egg/axolotl/util/keyhelper.py", line 3, in <module>
  File "build/bdist.linux-x86_64/egg/axolotl/identitykeypair.py", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/axolotl/state/storageprotos.py", line 9, in <module>
ImportError: cannot import name symbol_database

From the other post I could infer the that is a protobuf issue but I was not able to fix it! Someone could help me!?

forewerton avatar Jan 28 '15 15:01 forewerton

I managed to make it work. Here's what I did

1- Install a brand new copy of Ubuntu (ubuntu-14.10-desktop-amd64.iso)

2- RUN sudo apt-get install python python-dateutil python-argparse python-setuptools libncurses5-dev build-essential python-dev python-pexpect python-mysqldb

3- RUN wget https://github.com/tgalal/yowsup/archive/master.zip unzip master.zip cd yowsup-master sudo python setup.py install

4- RUN yowsup-cli

Pedro-H-Fialho avatar Jan 28 '15 16:01 Pedro-H-Fialho

Thahnks a lot!

Works just fine here!

forewerton avatar Jan 28 '15 17:01 forewerton

Traceback (most recent call last): File "/usr/local/bin/yowsup-cli", line 4, in import('pkg_resources').run_script('yowsup2==2.5.2', 'yowsup-cli') File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 748, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py", line 1517, in run_script exec(code, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 6, in from yowsup.env import YowsupEnv File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/env/init.py", line 1, in from .env import YowsupEnv File "/usr/local/lib/python2.7/dist-packages/yowsup2-2.5.2-py2.7.egg/yowsup/env/env.py", line 15, in class YowsupEnv(with_metaclass(YowsupEnvType, object)): File "/usr/lib/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 root@BBLPT0825:~/yowsup-2.5.2#

I too have same problem.

can u pls help on this bro?

arthahir avatar Oct 26 '17 10:10 arthahir

Traceback (most recent call last): File "/usr/local/bin/yowsup-cli", line 4, in import('pkg_resources').run_script('yowsup2==2.5.7', 'yowsup-cli') File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 765, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/init.py", line 1536, in run_script .format(**locals()), pkg_resources.ResolutionError: Script 'scripts/yowsup-cli' not found in metadata at '/usr/local/lib/python2.7/site-packages/yowsup2-2.5.7.dist-info'

Please help , getting this on running yowsup-cli

naushrambo avatar Jul 02 '18 11:07 naushrambo

I have the same issue.

Traceback (most recent call last):
  File "/Users/gomezd/Envs/scratch/bin/yowsup-cli", line 4, in <module>
    __import__('pkg_resources').run_script('yowsup2==2.5.7', 'yowsup-cli')
  File "/Users/gomezd/Envs/scratch/lib/python2.7/site-packages/pkg_resources/__init__.py", line 654, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/gomezd/Envs/scratch/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1425, in run_script
    .format(**locals()),
pkg_resources.ResolutionError: Script 'scripts/yowsup-cli' not found in metadata at '/Users/gomezd/Envs/scratch/lib/python2.7/site-packages/yowsup2-2.5.7.dist-info'

amb1s1 avatar Jul 14 '18 15:07 amb1s1

I'm also having same issue. I use mac

sknair123 avatar Dec 28 '19 10:12 sknair123

please help me I have a problem

W 2020-02-19 04:49:38,201 yowsup.common.http.warequest - Passing Config to WARequest is deprecated, pass a YowProfile instead Traceback (most recent call last): File "/usr/local/bin/yowsup-cli", line 4, in import('pkg_resources').run_script('yowsup==3.2.3', 'yowsup-cli') File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 534, in run_script self.require(requires)[0].run_script(script_name, ns) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1438, in run_script execfile(script_filename, namespace, namespace) File "/usr/local/lib/python2.7/dist-packages/yowsup-3.2.3-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 722, in if not parser.process(): File "/usr/local/lib/python2.7/dist-packages/yowsup-3.2.3-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 387, in process self.handleRequestCode(self.args["requestcode"], config) File "/usr/local/lib/python2.7/dist-packages/yowsup-3.2.3-py2.7.egg/EGG-INFO/scripts/yowsup-cli", line 398, in handleRequestCode codeReq = WACodeRequest(method, config) File "/usr/local/lib/python2.7/dist-packages/yowsup-3.2.3-py2.7.egg/yowsup/registration/coderequest.py", line 15, in init super(WACodeRequest,self).init(config) File "/usr/local/lib/python2.7/dist-packages/yowsup-3.2.3-py2.7.egg/yowsup/common/http/warequest.py", line 79, in init config.client_static_keypair = WATools.generateKeyPair() File "/usr/local/lib/python2.7/dist-packages/yowsup-3.2.3-py2.7.egg/yowsup/common/tools.py", line 70, in generateKeyPair return KeyPair.generate() File "/usr/local/lib/python2.7/dist-packages/consonance/structs/keypair.py", line 36, in generate keypair = X25519DH().generate_keypair() File "/usr/local/lib/python2.7/dist-packages/dissononce/dh/x25519/x25519.py", line 28, in generate_keypair private = x25519.X25519PrivateKey.generate() File "/home/pi/.local/lib/python2.7/site-packages/cryptography/hazmat/primitives/asymmetric/x25519.py", line 42, in generate _Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM cryptography.exceptions.UnsupportedAlgorithm: X25519 is not supported by this version of OpenSSL.

please solved

MaheshPandhega avatar Feb 19 '20 04:02 MaheshPandhega

When send command as 'yowsup-cli' it opens this Image, not sure how to resolve this

Vjkumar10 avatar Feb 24 '25 12:02 Vjkumar10