tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.08k stars 2.23k forks source link

Upload Media failed #2898

Open fabi321 opened 5 years ago

fabi321 commented 5 years ago

Describe the bug

I wanted to send a image using the doSendMedia function of the cli and then this happened.

Debug output

E 2019-11-13 17:55:03,953 yowsup.layers.network.dispatcher.dispatcher_asyncore - Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/usr/lib/python3.7/asyncore.py", line 422, in handle_read_event
    self.handle_read()
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/network/dispatcher/dispatcher_asyncore.py", line 48, in handle_read
    self.connectionCallbacks.onRecvData(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/network/layer.py", line 100, in onRecvData
    self.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/network/layer.py", line 103, in receive
    self.toUpper(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/noise/layer_noise_segments.py", line 39, in receive
    self.toUpper(bytes(data))
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/noise/layer.py", line 156, in receive
    self._flush_incoming_buffer()
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/noise/layer.py", line 144, in _flush_incoming_buffer
    self.toUpper(self._wa_noiseprotocol.receive())
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/coder/layer.py", line 21, in receive
    self.toUpper(node)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/logger/layer.py", line 14, in receive
    self.toUpper(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/axolotl/layer_control.py", line 35, in receive
    self.toUpper(protocolTreeNode)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 194, in receive
    s.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/axolotl/layer_receive.py", line 34, in receive
    self.toUpper(protocolTreeNode)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 194, in receive
    s.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 126, in receive
    if not self.processIqRegistry(node):
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 161, in processIqRegistry
    successClbk(protocolTreeNode, originalIq)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/protocol_media/layer.py", line 74, in onRequestUploadSuccess
    self.toUpper(ResultRequestUploadIqProtocolEntity.fromProtocolTreeNode(resultNode))
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/__init__.py", line 79, in toUpper
    self.__upper.receive(data)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/interface/interface.py", line 77, in receive
    if not self.processIqRegistry(entity):
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/interface/interface.py", line 56, in processIqRegistry
    successClbk(entity, originalIq)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/demos/cli/layer.py", line 403, in <lambda>
    successFn = lambda successEntity, originalEntity: self.onRequestUploadResult(jid, mediaType, path, successEntity, originalEntity, caption)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/demos/cli/layer.py", line 548, in onRequestUploadResult
    successFn, self.onUploadError, self.onUploadProgress, asynchronous=False)
  File "/usr/local/lib/python3.7/dist-packages/yowsup/layers/protocol_media/mediauploader.py", line 18, in __init__
    WARequest.__init__(self)
TypeError: __init__() missing 1 required positional argument: 'config'

Versions yowsup=="3.2.3"#2adc067 yowsup-cli=="3.2.0" consonance=="0.1.3-1" dissononce=="0.34.3" python-axolotl=="0.2.2" cryptography=="2.8"

To Reproduce

Send any type of media using the cli

OS Linux

ersinayaz commented 4 years ago

@tgalal support pls :)

modcastro commented 4 years ago

Upload media is a abandoned question. #2821 and so many others.

senosoft2009 commented 4 years ago

URL for sending image now is:

https://mmg-fna.whatsapp.net/mms/image/Mb5c1c1Xl9kY-33dH4kT1s6ZTYEJuCDMh7jvzpOXbjg=?auth=AWSXOCJbHsyCg29SxGQZXi0GIj-SZ_C7F6aZc1qxwdzS4r-jz2xvW7XsgBo&token=Mb5c1c1Xl9kY-33dH4kT1s6ZTYEJuCDMh7jvzpOXbjg%3D&resume=1

Current Yowsup' URL for sending image is: https://mmg.whatsapp.net/u/f/XrFMLaN-5XeluKsFlcUs91526c4ABaFp-Rm_ag/ApoengohIReS3H9MX583c9WR411ZKt_jeLxtq0TsBEbs

I don't know if it could help.

DeLuca92 commented 4 years ago

we need help to send media. Send msg ok. How i check if people recived my msg? and how i see if people send a msg for me? I know cli have this, but I make my script

DeLuca92 commented 4 years ago

@modcastro , hello. Not worki more send image?gif?video? Because in echotest works