How to get the message sender in yowsup cli echo?
<p>I'm using Yowsup cli to send and receive messages using whatsapp. I could register and send the messages. But when I execute this command to listen the incoming messages:</p>

<pre><code>yowsup-cli demos --login number:password --echo -E s40
</code></pre>

<p>I can see the message text, but I cannot see who is the message sender. How can I get it using yowsup-cli?</p>

<p>This is my result:</p>

<pre><code>yowsup-cli  v2.0.15
yowsup      v2.5.0

Copyright (c) 2012-2016 Tarek Galal
http://www.openwhatsapp.org

This software is provided free of charge. Copying and redistribution is
encouraged.

If you appreciate this software and you would like to support future
development please consider donating:
http://openwhatsapp.org/yowsup/donate


WARNING:yowsup.layers.axolotl.layer_receive:Received a message that we've previously decrypted, goint to send the delivery receipt myself
DUMP:

Teste 8
['\n', '\x07', 'T', 'e', 's', 't', 'e', ' ', '8']
[10, 7, 84, 101, 115, 116, 101, 32, 56]
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/google/protobuf/internal/python_message.py", line 1087, in MergeFromString
    if self._InternalParse(serialized, 0, length) != length:
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/google/protobuf/internal/python_message.py", line 1109, in InternalParse
    (tag_bytes, new_pos) = local_ReadTag(buffer, pos)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/google/protobuf/internal/decoder.py", line 181, in ReadTag
    while six.indexbytes(buffer, pos) &amp; 0x80:
TypeError: unsupported operand type(s) for &amp;: 'str' and 'int'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/yowsup-cli", line 368, in &lt;module&gt;
    if not parser.process():
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/yowsup-cli", line 270, in process
    self.startEcho()
  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/yowsup-cli", line 308, in startEcho
    stack.start()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/demos/echoclient/stack.py", line 21, in start
    self.stack.loop()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/stacks/yowstack.py", line 196, in loop
    asyncore.loop(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncore.py", line 203, in loop
    poll_fun(timeout, map)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncore.py", line 150, in poll
    read(obj)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncore.py", line 87, in read
    obj.handle_error()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncore.py", line 83, in read
    obj.handle_read_event()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncore.py", line 423, in handle_read_event
    self.handle_read()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/network/layer.py", line 102, in handle_read
    self.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/network/layer.py", line 110, in receive
    self.toUpper(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/__init__.py", line 76, in toUpper
    self.__upper.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/stanzaregulator/layer.py", line 29, in receive
    self.processReceived()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/stanzaregulator/layer.py", line 52, in processReceived
    self.processReceived()
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived
    self.toUpper(oneMessageData)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/__init__.py", line 76, in toUpper
    self.__upper.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/auth/layer_crypt.py", line 65, in receive
    self.toUpper(payload)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/__init__.py", line 76, in toUpper
    self.__upper.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/coder/layer.py", line 35, in receive
    self.toUpper(node)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/__init__.py", line 76, in toUpper
    self.__upper.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/logger/layer.py", line 14, in receive
    self.toUpper(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/__init__.py", line 76, in toUpper
    self.__upper.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/axolotl/layer_control.py", line 44, in receive
    self.toUpper(protocolTreeNode)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/__init__.py", line 76, in toUpper
    self.__upper.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/__init__.py", line 189, in receive
    s.receive(data)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/axolotl/layer_receive.py", line 41, in receive
    self.onMessage(protocolTreeNode)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/axolotl/layer_receive.py", line 74, in onMessage
    self.handleEncMessage(protocolTreeNode)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/axolotl/layer_receive.py", line 88, in handleEncMessage
    self.handleWhisperMessage(node)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/axolotl/layer_receive.py", line 144, in handleWhisperMessage
    self.parseAndHandleMessageProto(encMessageProtocolEntity, plaintext[:-padding])
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/yowsup/layers/axolotl/layer_receive.py", line 171, in parseAndHandleMessageProto
    m.ParseFromString(serializedData)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/google/protobuf/message.py", line 185, in ParseFromString
    self.MergeFromString(serialized)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/google/protobuf/internal/python_message.py", line 1093, in MergeFromString
    raise message_mod.DecodeError('Truncated message.')
google.protobuf.message.DecodeError: Truncated message.
</code></pre>

<p>Actually, this is a problem that occurs when python 3.5 is used. So, I used python 2.7 and it's solved. </p>

python yowsup