Yowsup - old_version error

偶尔善良 提交于 2019-12-24 12:14:50

问题


i've got yowsup on my linux and when I trying to execute yowsup-cli registration -C <CountryCode> -r sms -p <Phone Number with Country Code> I'm getting

INFO:yowsup.common.http.warequest:{"status":"fail","reason":"old_version"}

status: fail

reason: old_version

Is there any way to fix this?


回答1:


Note that there are two YowsupEnv implementations at: yowsup/env, specifically: env_android.py and env_s40.py.

First, change the values of the following attributes at env_android.py: _MD5_CLASSES = "7UDPOXwpiLBvEjT8uNwsuA=="

_KEY = "eQV5aq/Cg63Gsq1sshN9T3gh+UUp0wIw0xgHYT1bnCjEqOJQKCRrWxdAe2yvsDeCJL+Y4G3PRD2HUF7oUgiGo8vGlNJOaux26k+A2F3hj8A="

_VERSION = "2.12.440"

Then, you'll have to tell Yowsup to use the Android environment instead of the default S40 environment. To do so, modify the files:

yowsup/registration/coderequest.py

yowsup/common/http/warequest.py

In both of them, replace the variable: CURRENT_ENV = S40YowsupEnv()

With: CURRENT_ENV = AndroidYowsupEnv()

Don't forget to also change the corresponding import statement as: from yowsup.env import AndroidYowsupEnv

That should do the trick.




回答2:


follow these 3 simple steps:

git remote add jlguardi https://github.com/jlguardi/yowsup.git
git pull jlguardi Android_2.12.440
git merge jlguardi/Android_2.12.440
sudo python setup.py install

It pretty much does the same as the above answer



来源:https://stackoverflow.com/questions/35877803/yowsup-old-version-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!