whatsapp-framework icon indicating copy to clipboard operation
whatsapp-framework copied to clipboard

Whatsapp bot crashed with code 1. Respawning..

Open camiu01 opened this issue 6 years ago • 21 comments

i have start ./start.sh with su but it crash a little help?

File "run.py", line 56, in c = MacStack() File "run.py", line 28, in init self.stack.setCredentials(credentials) File "/usr/local/lib/python3.6/dist-packages/yowsup2-2.5.2-py3.6.egg/yowsup/stacks/yowstack.py", line 156, in setCredentials self.getLayerInterface(YowAuthenticationProtocolLayer).setCredentials(*credentials) File "/usr/local/lib/python3.6/dist-packages/yowsup2-2.5.2-py3.6.egg/yowsup/layers/auth/layer_interface_authentication.py", line 5, in setCredentials self._layer.setCredentials((phone, password)) File "/usr/local/lib/python3.6/dist-packages/yowsup2-2.5.2-py3.6.egg/yowsup/layers/auth/layer_authentication.py", line 46, in setCredentials self._credentials = self.__getCredentials(credentials) File "/usr/local/lib/python3.6/dist-packages/yowsup2-2.5.2-py3.6.egg/yowsup/layers/auth/layer_authentication.py", line 41, in __getCredentials password = base64.b64decode(pb64) File "/usr/lib/python3.6/base64.py", line 87, in b64decode return binascii.a2b_base64(s) binascii.Error: Incorrect padding Whatsapp bot crashed with code 1. Respawning..

camiu01 avatar Jan 07 '19 18:01 camiu01

Looks like you're using python3.6 instead of 3.5

mikesalmonuk avatar Jan 08 '19 15:01 mikesalmonuk

i go on 3.5? how can I do it in linux?

camiu01 avatar Jan 08 '19 15:01 camiu01

On the frontpage of "https://github.com/danielcardeenas/whatsapp-framework" is says "This needs Python 3.5"

You'll need to install 3.5 instead of 3.6

mikesalmonuk avatar Jan 08 '19 15:01 mikesalmonuk

ok i test it

camiu01 avatar Jan 08 '19 15:01 camiu01

there are the metod for take python 3.5 i have a windows 10 with emulator

camiu01 avatar Jan 08 '19 15:01 camiu01

Sorry, not sure. I use docker on linux and start with FROM python:3.5 so can't help you with windows emulators. Maybe try google for it.

mikesalmonuk avatar Jan 08 '19 15:01 mikesalmonuk

Obviously not a problem of Python 3.6 I'm using it on 3.6 and it is running fine...

x-frst avatar Jan 08 '19 15:01 x-frst

and then what is the problem?

camiu01 avatar Jan 08 '19 15:01 camiu01

someone can send me the config file I think I was wrong to configure it

camiu01 avatar Jan 08 '19 15:01 camiu01

There are several things that can cause this problem, what happened to me was that I had the password string in config.py with spaces and also badly stuck from the one I returned yowsup, verify that these data are correctly.

jhonarodriguez avatar Jan 08 '19 15:01 jhonarodriguez

Check this line

https://github.com/danielcardeenas/whatsapp-framework/blob/master/config.py#L3

jhonarodriguez avatar Jan 08 '19 15:01 jhonarodriguez

Remember the quotes in each string of number and password

jhonarodriguez avatar Jan 08 '19 15:01 jhonarodriguez

` File "run.py", line 4, in from yowsup.layers.axolotl.props import PROP_IDENTITY_AUTOTRUST File "/usr/local/lib/python3.6/dist-packages/yowsup2-2.5.2-py3.6.egg/yowsup/layers/axolotl/init.py", line 1, in from .layer_send import AxolotlSendLayer File "/usr/local/lib/python3.6/dist-packages/yowsup2-2.5.2-py3.6.egg/yowsup/layers/axolotl/layer_send.py", line 6, in from axolotl.sessioncipher import SessionCipher File "/usr/local/lib/python3.6/dist-packages/python_axolotl-0.1.39-py3.6.egg/axolotl/sessioncipher.py", line 5, in ModuleNotFoundError: No module named 'Crypto' Whatsapp bot crashed with code 1. Respawning.. now it give this error lol

camiu01 avatar Jan 08 '19 15:01 camiu01

Test using the command

pip3 install yowsup2

jhonarodriguez avatar Jan 08 '19 15:01 jhonarodriguez

-bash: pip3: command not found @elchory96 from cmd

camiu01 avatar Jan 08 '19 16:01 camiu01

Are you in linux?

jhonarodriguez avatar Jan 08 '19 16:01 jhonarodriguez

In your terminal, execute the following commands

sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

sudo python3 get-pip.py

jhonarodriguez avatar Jan 08 '19 16:01 jhonarodriguez

File "run.py", line 9, in <module> from app.layer import MacLayer File "/home/t/whatsapp-framework/app/__init__.py", line 1, in <module> import modules File "/home/t/whatsapp-framework/modules/__init__.py", line 3, in <module> from modules.hihelp import hihelp File "/home/t/whatsapp-framework/modules/hihelp/hihelp.py", line 1, in <module> from app.mac import mac, signals File "/home/t/whatsapp-framework/app/mac/signals.py", line 1, in <module> from blinker import signal ModuleNotFoundError: No module named 'blinker' Whatsapp bot crashed with code 1. Respawning.. help 😅😥

camiu01 avatar Jan 08 '19 17:01 camiu01

Just a normal module not found error I assume that you didn't run ./setup.sh at beginning. Run this if still problem persist then use pip3 install blinker

A simpler way to get pip3 is sudo apt-get install python3-pip

x-frst avatar Jan 08 '19 18:01 x-frst

Just a normal module not found error I assume that you didn't run ./setup.sh at beginning. Run this if still problem persist then use pip3 install blinker

A simpler way to get pip3 is sudo apt-get install python3-pip

You're right, it would be an easier way. if not I always try to give that option since the apt-get or yum command or any other one that does not have it installed, I avoid the explanation of the installation of those commands.

jhonarodriguez avatar Jan 08 '19 18:01 jhonarodriguez