tax / pywhatsapp

Simple wrapper around yowsup to send a message or mediafile with whatsapp
Other
63 stars 23 forks source link

error when send message #11

Open ghost opened 7 years ago

ghost commented 7 years ago
Traceback (most recent call last):
  File "whatsapp_spammer.py", line 37, in getRegister
    self.sendMessage()
  File "whatsapp_spammer.py", line 89, in sendMessage
    print self.client.send_message('09549****', 'test message whatsapp')            
  File "/home/foozzi/projects/whatsapp/whatsapp/yowsup_wrapper.py", line 206, in send_message
    self._send_message(to, message)
  File "/home/foozzi/projects/whatsapp/whatsapp/yowsup_wrapper.py", line 174, in _send_message
    self.stack.loop()
  File "./lib/yowsup/stacks/yowstack.py", line 196, in loop
    asyncore.loop(*args, **kwargs)
  File "/usr/lib/python2.7/asyncore.py", line 216, in loop
    poll_fun(timeout, map)
  File "/usr/lib/python2.7/asyncore.py", line 162, in poll
    write(obj)
  File "/usr/lib/python2.7/asyncore.py", line 95, in write
    obj.handle_error()
  File "/usr/lib/python2.7/asyncore.py", line 91, in write
    obj.handle_write_event()
  File "/usr/lib/python2.7/asyncore.py", line 467, in handle_write_event
    self.handle_connect_event()
  File "/usr/lib/python2.7/asyncore.py", line 455, in handle_connect_event
    self.handle_connect()
  File "./lib/yowsup/layers/network/layer.py", line 82, in handle_connect
    self.emitEvent(YowLayerEvent(YowNetworkLayer.EVENT_STATE_CONNECTED))
  File "./lib/yowsup/layers/__init__.py", line 89, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "./lib/yowsup/layers/__init__.py", line 89, in emitEvent
    self.__upper.emitEvent(yowLayerEvent)
  File "./lib/yowsup/layers/__init__.py", line 83, in emitEvent
    if self.__upper and not self.__upper.onEvent(yowLayerEvent):
  File "./lib/yowsup/layers/__init__.py", line 104, in onEvent
    return self.event_callbacks[eventName](yowLayerEvent)
  File "./lib/yowsup/layers/coder/layer.py", line 23, in onConnected
    self.getProp(self.__class__.PROP_RESOURCE)
  File "./lib/yowsup/layers/coder/encoder.py", line 21, in getStreamStartBytes
    self.writeAttributes(streamOpenAttributes, data)
  File "./lib/yowsup/layers/coder/encoder.py", line 58, in writeAttributes
    self.writeString(value, data, True);
  File "./lib/yowsup/layers/coder/encoder.py", line 147, in writeString
    atIndex = tag.index(at)
AttributeError: 'NoneType' object has no attribute 'index'

what is wrong?

AbhayKD commented 7 years ago

DId you register yourself on yowsup??

ghost commented 7 years ago

@AbhayKD of course)

shubhamivane commented 7 years ago

how to register on yowsup?

iamjagjeetubhi commented 6 years ago

@shubhamivane You can follow this tutorial. To register on YOWSUP