Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send messages in language other than English #52

Closed
uraid opened this issue Apr 7, 2016 · 3 comments
Closed

Unable to send messages in language other than English #52

uraid opened this issue Apr 7, 2016 · 3 comments

Comments

@uraid
Copy link

uraid commented Apr 7, 2016

Can't send unicode messages (for example Hebrew).
Tried creating a new 'TextMessageProtocolEntity' and echo back in my code, and also tried using EchoClient but same result.
Thanks a lot in advance!

Log:

root@raspberrypi:~# yowsup-cli demos -e -l xxxxxxxxxx:xxxxxxxxxx
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
ERROR:yowsup.layers.axolotl.layer:No sender key for: <axolotl.groups.senderkeyname.SenderKeyName object at 0x1a1bed0>
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
ERROR:yowsup.layers.axolotl.layer:No session for: xxxxxxxxxx, 1
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
WARNING:yowsup.layers.axolotl.layer:No such signedprekeyrecord! 46252
WARNING:yowsup.layers.axolotl.layer:No valid sessionsBad Mac!
Echoing כחול? to xxxxxxxxxx-xxxxxxxxxx
Traceback (most recent call last):
File "/usr/local/bin/yowsup-cli", line 324, in
if not parser.process():
File "/usr/local/bin/yowsup-cli", line 230, in process
self.startEcho()
File "/usr/local/bin/yowsup-cli", line 266, in startEcho
stack.start()
File "/usr/local/lib/python2.7/dist-packages/yowsup/demos/echoclient/stack.py", line 23, in start
self.stack.loop()
File "/usr/local/lib/python2.7/dist-packages/yowsup/stacks/yowstack.py", line 195, 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 156, in poll
read(obj)
File "/usr/lib/python2.7/asyncore.py", line 87, in read
obj.handle_error()
File "/usr/lib/python2.7/asyncore.py", line 83, in read
obj.handle_read_event()
File "/usr/lib/python2.7/asyncore.py", line 449, in handle_read_event
self.handle_read()
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 102, in handle_read
self.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/network/layer.py", line 110, in receive
self.toUpper(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 75, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 29, in receive
self.processReceived()
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/stanzaregulator/layer.py", line 49, in processReceived
self.toUpper(oneMessageData)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 75, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/auth/layer_crypt.py", line 65, in receive
self.toUpper(payload)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 75, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/coder/layer.py", line 35, in receive
self.toUpper(node)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 75, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/logger/layer.py", line 14, in receive
self.toUpper(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 75, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 132, in receive
self.onMessage(protocolTreeNode)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 154, in onMessage
self.handleEncMessage(protocolTreeNode)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 226, in handleEncMessage
self.handlePreKeyWhisperMessage(node)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 275, in handlePreKeyWhisperMessage
self.parseAndHandleMessageProto(pkMessageProtocolEntity, plaintext[:-padding])
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 330, in parseAndHandleMessageProto
self.handleConversationMessage(node, m.conversation)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 360, in handleConversationMessage
self.toUpper(messageNode)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 75, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 188, in receive
s.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 124, in receive
recv(node)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/protocol_messages/layer.py", line 21, in recvMessageStanza
self.toUpper(entity)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 75, in toUpper
self.upper.receive(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/interface/interface.py", line 78, in receive
self.entity_callbacksentityType
File "/usr/local/lib/python2.7/dist-packages/yowsup/demos/echoclient/layer.py", line 13, in onMessage
self.toLower(messageProtocolEntity.forward(messageProtocolEntity.getFrom()))
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 79, in toLower
self.lower.send(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 192, in send
s.send(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 130, in send
send(entity)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/protocol_messages/layer.py", line 15, in sendMessageEntity
self.entityToLower(entity)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 134, in entityToLower
self.toLower(entity.toProtocolTreeNode())
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/init.py", line 79, in toLower
self.lower.send(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/axolotl/layer.py", line 124, in send
self.toLower(node)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/__init
.py", line 79, in toLower
self.lower.send(data)
File "/usr/local/lib/python2.7/dist-packages/yowsup/layers/logger/layer.py", line 8, in send
logger.debug("tx:\n%s" % ldata)
File "/usr/local/lib/python2.7/dist-packages/yowsup/structs/protocoltreenode.py", line 88, in __str

return self.toString()
File "/usr/local/lib/python2.7/dist-packages/yowsup/structs/protocoltreenode.py", line 80, in toString
out += c.toString()
File "/usr/local/lib/python2.7/dist-packages/yowsup/structs/protocoltreenode.py", line 76, in toString
out += "\nHEX:%s\n" % binascii.hexlify(self.data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-3: ordinal not in range(128)

@jlguardi
Copy link
Owner

jlguardi commented Apr 7, 2016

Please, update to my master and reproduce the error with:

yowsup-cli demos -y -d -c...

I was testing/fixing some bugs yesterday about this topic.

@uraid
Copy link
Author

uraid commented Apr 8, 2016

When logging in using -y -d -c (and receiving non-english message):
test.txt

When sending non-english message using -y I can't reproduce the error and the message is sent successfully :(

@jlguardi
Copy link
Owner

jlguardi commented Apr 8, 2016

Update with my master. I've fixed reception issue in cli two days ago.

However, the error shown in your log isn't the same as described initially in the issue.

Update and make the test again with yowsup-cli demos -y. If error persists, open again the issue.

@jlguardi jlguardi closed this as completed Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants