whatsapp-framework
whatsapp-framework copied to clipboard
./start.sh Crashed
Hi, I try start after install and receive:
SyntaxError: invalid syntax
Whatsapp bot crashed with code 1. Respawning..
Traceback (most recent call last):
File "run.py", line 9, in
Thanks for any help
Same here, that first error can be fixed by removing the async=True, however, the error is in yowsup as this follows:
File "/Users/jafrancov/dev/python/whatsapp-bot/lib/python3.7/site-packages/yowsup2-2.5.2-py3.7.egg/yowsup/layers/protocol_media/mediauploader.py", line 19
def __init__(self, jid, accountJid, sourcePath, uploadUrl, resumeOffset = 0, successClbk = None, errorClbk = None, progressCallback = None, async = True):
It looks like async is now a reserved word in Python 3.7+
Hi!
The issue is related to the Python version. It should be 3.5.0
. Just follow the next steps:
- install pyenv:
brew install pyenv
- install python 3.5.0:
pyenv install 3.5.0
- set this in your .bashrc or .zshrc
eval "$(pyenv init -)"
- Open a new terminal tab and set python global version:
pyenv global 3.5.0
- clean previous setup:
sudo ./clean.sh
- Re-run the setup script
sudo ./setup.sh
- register your number and follow the readme instructions
- Run the server
sudo ./start.sh
Hope it helps.
First Start and number has already been banned, even sent a message. @horozco
Hi @horozco Thanks for your solution but it crashes:
Traceback (most recent call last):
File "run.py", line 5, in <module>
from yowsup.layers.auth import AuthError
File "/Users/me/.pyenv/versions/3.5.0/lib/python3.5/site-packages/yowsup2-2.5.2-py3.5.egg/yowsup/layers/auth/__init__.py", line 2, in <module>
from .layer_authentication import YowAuthenticationProtocolLayer
File "/Users/me/.pyenv/versions/3.5.0/lib/python3.5/site-packages/yowsup2-2.5.2-py3.5.egg/yowsup/layers/auth/layer_authentication.py", line 4, in <module>
from yowsup.common.tools import TimeTools
File "/Users/me/.pyenv/versions/3.5.0/lib/python3.5/site-packages/yowsup2-2.5.2-py3.5.egg/yowsup/common/tools.py", line 3, in <module>
from dateutil import tz
ImportError: No module named 'dateutil'
Whatsapp bot crashed with code 1. Respawning..
Any idea?
Oh nevermind, i installed the dateutil package with pip install python-dateutil
and it works!
Thanks!