danielcardeenas / whatsapp-framework

⚗️Whatsapp python api
1.16k stars 362 forks source link

Whatsapp bot crashed with code 1. Respawning.. #239

Open camiu01 opened 5 years ago

camiu01 commented 5 years ago

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..

mikesalmonuk commented 5 years ago

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

camiu01 commented 5 years ago

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

mikesalmonuk commented 5 years ago

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

camiu01 commented 5 years ago

ok i test it

camiu01 commented 5 years ago

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

mikesalmonuk commented 5 years ago

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.

x-frst commented 5 years ago

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

camiu01 commented 5 years ago

and then what is the problem?

camiu01 commented 5 years ago

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

jhonarodriguez commented 5 years ago

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 commented 5 years ago

Check this line

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

jhonarodriguez commented 5 years ago

Remember the quotes in each string of number and password

camiu01 commented 5 years ago

` 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

jhonarodriguez commented 5 years ago

Test using the command

pip3 install yowsup2

camiu01 commented 5 years ago

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

jhonarodriguez commented 5 years ago

Are you in linux?

jhonarodriguez commented 5 years ago

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

camiu01 commented 5 years ago

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 😅😥

x-frst commented 5 years ago

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

jhonarodriguez commented 5 years ago

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.