Closed cfenollosa closed 8 years ago
I'm having this problem too. thnks.
I've never tried ;) I'll fix today.
Thanks!
Here's sample code so that you don't need to search for it:
entity = LocationMediaMessageProtocolEntity('41.3780485', '2.1249203', 'Example location', 'http://example.com', to='34666123456@s.whatsapp.net')
self.toLower(entity)
Hi, it's still not working, you need to change lines 525 and 526 in axolotl/layer.py
, "degress" to "degrees" too, and then it drops more errors:
Unhandled exception in thread started by <bound method LayerRacc.send_reply_delayed of <layer_whatsapp.layer_racc.LayerRacc object at 0x7f692b75a710>>
Traceback (most recent call last):
File "/home/astx/whatsbot/whatsapp-bot/layer_whatsapp/layer_racc.py", line 170, in send_reply_delayed
self.toLower(entity)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 79, in toLower
self.__lower.send(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 192, in send
s.send(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 130, in send
send(entity)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/protocol_media/layer.py", line 37, in sendMessageEntity
self.entityToLower(entity)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 134, in entityToLower
self.toLower(entity.toProtocolTreeNode())
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/__init__.py", line 79, in toLower
self.__lower.send(data)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 122, in send
self.handlePlaintextNode(node)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 190, in handlePlaintextNode
messageData = self.serializeToProtobuf(node) if v2 else node.getChild("body").getData()
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 502, in serializeToProtobuf
return self.serializeMediaToProtobuf(node.getChild("media"))
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 516, in serializeMediaToProtobuf
return self.serializeLocationToProtobuf(mediaNode)
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/yowsup2-2.4.48-py2.7.egg/yowsup/layers/axolotl/layer.py", line 532, in serializeLocationToProtobuf
return m.SerializeToString()
File "/home/astx/whatsbot/env/local/lib/python2.7/site-packages/google/protobuf/internal/python_message.py", line 831, in SerializeToString
self.DESCRIPTOR.full_name, ','.join(self.FindInitializationErrors())))
google.protobuf.message.EncodeError: Message com.whatsapp.proto.Message is missing required fields: location_message.jpeg_thumbnail
I've never tested ;) I'll fix!
Thanks! By the way, I'm using protobuf==3.0.0-alpha-1
I've fixed typos in media while sending encrypted but they aren't still received (I get ack and receipt but not seen). I'll continue but this issue is fixed.
Hi @jlguardi,
I updated the code to the latest master (plus axolotl dev) and now location messages drop an error when sending: