简体   繁体   中英

command python yowsup-cli -c config … not working on raspberry pi

I am working on sending messages from RasPi through Whatsapp. I have already installed yowsup .
I have completed with the registration process using the following commands, and have stored it in a config file:

python yowsup-cli registration --requestcode sms --phone 39xxxxxxxxxx --cc 39 --mcc 222 --mnc 10  
python yowsup-cli registration --register xxx-xxx --phone 39xxxxxxxxxx --cc 39

I am also able to send and receive messages from RasPi using the yowsup command-line client using the following command:

yowsup-cli demos --yowsup --config config

But when I type the following command:

python yowsup-cli -c config -w -s 39xxxxxxxxxx "Message"

I get the following error:

Available commands are  
demos  versions  registration

How can I directly send a message through a Python script, without going through the client?

This isn't related to raspberry-pi.

The new yowsup-cli 2.0 changed the command line interface, and now you should run instead:

python yowsup-cli demos -c config -s 39xxxxxxxxxx "Message"

Now, you mention that you want to send from python directly, but note that your command line python yowsup-cli is still going through the "client". If you want to send directly from your python script, follow the yowsup tutorials and/or read the actual yowsup-cli code as example for usage.

Having all that said, yowsup has a bit to go in the way of documentation. I guess it's up to all of us to contribute.

the new yowsup-cli 2.0 has improved and does'nt need -w anymore, well there is another python module which can help you to send messages using yowsup

pywhatsapp 0.0.7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM