whatsapp-framework
whatsapp-framework copied to clipboard
Yowsup have update v3, please update this framework
Hi, I notice that yowsup have update their library to v3, this version use noise protocol so it fix some problem that raised lately. please update this framework, I tried just update yowsup v3 only, but many errors raised, I believe yowsup made some changes in their function so this framework need little adjustment to make it work..
Thank you for your great jobs make this framework easier to implemented yowsup
Yes please update the framework
@danielcardeenas yes we need you to reply on this thread ASAP! Because even though Yowsup is updated we can't use this framework due to protocol changes...
Because we did not help @danielcardeenas , and together we started to mount the compatibility of the library again?
I already managed to solve so that the bot receives messages again, and sends them.
As I saw it, in run.py touch comment the line:
# except AuthError as e:
# print ("Auth Error, reason% s"% e)
Because the AuthError library no longer exists in from yowsup.layers.auth
The
sudo ./setup.sh
of this repository should not be used since it will be installing the old version of yowsup that Daniel Cardenas has.
Therefore, you must first run the command
pip3 install yowsup
then install the library
pip3 install pycrypto
and
pip3 install blinker
Then when registering the number with the command
Replace CC with your country code (See https://countrycode.org)
yowsup-cli registration --requestcode sms --phone CCXXXXXXXX --cc CC -E Android
After getting the sms code (in this example: 123456)
yowsup-cli registration --register 123456 --phone CCXXXXXXXX --cc CC -E Android
the password does not exist anymore, now there is one called
client_static_keypair
which would be the new password, which is what you must add to the config.py.
I will continue reviewing possible problems. I will be updating this issue
TypeError: pushDefaultLayers() takes 1 positional argument but 2 were given
Remove parameter in line 24 of run.py
OLD
.pushDefaultLayers(encryption)\
NEW
.pushDefaultLayers()\
Thank you @elchory96 I can running this framework again, but can you solve how to send image? I tried but always failed to send image
What error do you get?
Yes @elchory96 media sending is not working I mean I didn't try it on this framework I tried on terminal yowsup demos /image send <number> <location>
and I got yowsup.demos.cli.layer - Request upload for file /path/to/pic.png for [email protected] failed
Also I tried all things step by step but getting error after starting Mac
[Whatsapp] Mac started
W 2019-04-24 00:11:54,612 yowsup.layers.protocol_ib.layer - ignoring edge_routing ib node for now
Traceback (most recent call last):
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/network/dispatcher/dispatcher_socket.py", line 42, in connectAndLoop
self.connectionCallbacks.onRecvData(data)
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/network/layer.py", line 82, in onRecvData
self.receive(data)
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/network/layer.py", line 85, in receive
self.toUpper(data)
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 79, in toUpper
self.__upper.receive(data)
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/noise/layer_noise_segments.py", line 39, in receive
self.toUpper(bytes(data))
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 79, in toUpper
self.__upper.receive(data)
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/noise/layer.py", line 149, in receive
self._flush_incoming_buffer()
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/noise/layer.py", line 137, in _flush_incoming_buffer
self.toUpper(self._wa_noiseprotocol.receive())
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/__init__.py", line 79, in toUpper
self.__upper.receive(data)
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/coder/layer.py", line 19, in receive
node = self.reader.getProtocolTreeNode(bytearray(data))
File "/home/amitgamingking/.local/lib/python3.6/site-packages/yowsup/layers/coder/decoder.py", line 11, in getProtocolTreeNode
raise ValueError("deflate payloads are not supported")
ValueError: deflate payloads are not supported
E 2019-04-24 00:11:55,288 yowsup.layers.network.dispatcher.dispatcher_socket - deflate payloads are not supported
bot will crash if receiving media file, any idea how ignore this type of message temporary before yowsup update their code?
@Sharissa90 are you able to run bot normally for receiving and sending text messages?
@Sharissa90 are you able to run bot normally for receiving and sending text messages?
Able to send and recived....
bot will crash if receiving media file, any idea how ignore this type of message temporary before yowsup update their code?
Error on reciving one image
AttributeError: 'ImageDownloadableMediaMessageProtocolEntity' object has no attribute 'getMediaKey' E 2019-04-24 14:30:31,109 yowsup.layers.network.dispatcher.dispatcher_socket - 'ImageDownloadableMediaMessageProtocolEntity' object has no attribute 'getMediaKey'
Not able to send Images....seems to be a thing from youwsup 3
@Sharissa90 are you able to run bot normally for receiving and sending text messages?
@AmitGamingKing yes, but not stable like yowsup2. sometimes it crashing, I think yowsup V3 still buggy
I have trick to solve bot crashing on receiving media file, edit file app/layer.py find @ProtocolEntityCallback("message") and edit like this
@ProtocolEntityCallback("message") def on_message(self, message_entity): mac.receive_message(self, message_entity) if message_entity.getType() == 'text': message = Message(message_entity) if message.valid: signals.message_received.send(message) if helper.is_command(message.message): signals.command_received.send(message) elif message_entity.getType() == 'media': pass # if message_entity.getMediaType() == "location": # message = Message(message_entity) # if message.valid: # signals.message_received.send(message) # if hasattr(message_entity, 'getMediaType'): # self.onMediaMessage(message_entity) mac.disconnect(self)
sword, which is what you must add to the config.py.
I will continue reviewing possible problems. I will be updating this iss
hello, i am newbie on this, i ran the commands of library into whatsapp framework but it wont taking my phone number, just giving me errors, first when i try to register with: yowsup-cli registration --requestcode sms --phone CCXXXXXXXX --cc CC -E Android
it says invalid argument 'Android' choose from "android" without uppercase, but when i run it this gives me many errors
Still waiting for update no response for @danielcardeenas :(
Hello, seeing that @danielcardeenas has not appeared, I decided to start a new hybrid project between yowsup3 and whatsapp-framework. Although the installation of yowsup3 does not generate errors, and the first connection with whatsapp is established correctly, there are errors that I think the community can help solve.
The repository link is: https://github.com/devalexanderdaza/yowsapp-framework
@devalexanderdaza do you able send image?
@devalexanderdaza puedes enviar la imagen?
In a while I will create an incidence in the repository to manage the support of the community. Follow the instructions contained in the repository so that you can reach the error and between all of us we can solve it and use the library again
Update yowsup-cli v3.2.0 yowsup v3.2.3
Made the modificacion on top and .... got this error
Traceback (most recent call last):
File "run.py", line 9, in
used to work with yowsup v3.0
nano app/mac/mac.py
delete 'AxolotlOptionalModule' from yowsup.common.optionalmodules import PILOptionalModule
nano app/utils/downloader.py comment #from yowsup.layers.protocol_media.mediadownloader import MediaDownloader
#return MediaDownloader().download(url.decode('ASCII')) sudo app/layer.py
comment #from yowsup.layers.protocol_media.mediadownloader import MediaDownloader
sudo ./clean.sh
./start.sh
but Errors
line 63, in on_auth assert type(local_static) is KeyPair
yowsup-cli v3.2.0 yowsup v3.2.3
@Gabrieru, U need to provide your country code in place of CC.
Hi,
I installed the next packages in my raspberry with pip3: -python-axolotl -protobuf -six -argparse -readline -pillow -tqdm -requests -yowsup -pycrypto -blinker
next, I download your repository (today is 2019-May-17), I live in Colombian, so I intent send the registration with: yowsup-cli registration --requestcode sms --phone 57317509xxx --cc 57 -E android
but the console print a error:
Traceback (most recent call last):
File "/usr/local/bin/yowsup-cli", line 4, in
The Version is: yowsup-cli v2.0.15 Using yowsup v3.2.3
#could help me, please?
yowsup-cli registration --requestcode sms --phone 57317509xxx --cc 57 -E android
@wisrovi just type yowsup-cli registration --requestcode sms --config-phone 57317509xxx --cc 57
ok, I executed this: yowsup-cli registration --requestcode sms --config-phone 57317509xxx --cc 57
But the console printed: usage: registration [-h] [-v] [-d] [--help-config] [-c CONFIG] [-E {android}] [-m MCC] [-n MNC] [-p PHONE] [-C CC] [-r (sms|voice) | -R code] registration: error: unrecognized arguments: --config-phone 57317509xxxx
The version for youwsup version -v is: yowsup-cli v2.0.15 Using yowsup v3.2.3
someone got it working? i can pay for that if can help me to fix
ok, I executed this: yowsup-cli registration --requestcode sms --config-phone 57317509xxx --cc 57
But the console printed: usage: registration [-h] [-v] [-d] [--help-config] [-c CONFIG] [-E {android}] [-m MCC] [-n MNC] [-p PHONE] [-C CC] [-r (sms|voice) | -R code] registration: error: unrecognized arguments: --config-phone 57317509xxxx
The version for youwsup version -v is: yowsup-cli v2.0.15 Using yowsup v3.2.3
my mistake use --config-cc not just --cc
yowsup-cli registration --requestcode sms --config-phone 57317509xxx --config-cc 57
I tried this: yowsup-cli registration --requestcode sms --config-phone 57317509xxxx --config-cc 57
but, The console: error: unrecognized arguments: --config-phone 573175098360 --config-cc 57
could could help me, please?
Thanks a lot