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

/profile setStatus with non-latin characters throw out an exception #2814

Open
jfkz opened this issue Jun 16, 2019 · 0 comments
Open

/profile setStatus with non-latin characters throw out an exception #2814

jfkz opened this issue Jun 16, 2019 · 0 comments
Assignees

Comments

@jfkz
Copy link

jfkz commented Jun 16, 2019

Describe the bug

/profile setStatus with non-latin characters throw out an exception.

UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-5: ordinal not in range(256)

Debug output

W 2019-06-16 17:31:48,688 yowsup.layers.protocol_profiles.protocolentities.iq_status_set - Passing text as str is deprecated, pass bytes instead
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.5/threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "/home/mike/yowsup-scripts/yowsup/yowsup/demos/cli/cli.py", line 154, in startInputThread
    wait = self.execCmd(cmd)
  File "/home/mike/yowsup-scripts/yowsup/yowsup/demos/cli/cli.py", line 138, in execCmd
    return self.doExecCmd(lambda :targetFn(*args))
  File "/home/mike/yowsup-scripts/yowsup/yowsup/demos/cli/cli.py", line 141, in doExecCmd
    return fn()
  File "/home/mike/yowsup-scripts/yowsup/yowsup/demos/cli/cli.py", line 138, in <lambda>
    return self.doExecCmd(lambda :targetFn(*args))
  File "/home/mike/yowsup-scripts/yowsup/yowsup/demos/cli/layer.py", line 157, in profile_setStatus
    entity = SetStatusIqProtocolEntity(text)
  File "/home/mike/yowsup-scripts/yowsup/yowsup/layers/protocol_profiles/protocolentities/iq_status_set.py", line 19, in __init__
    text = bytes(text, "latin-1")
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 0-5: ordinal not in range(256)

Config file

Nothing special, works with default config.

Versions

yowsup-cli v3.2.0
using:
  dissononce v0.34.3
  python-axolotl v0.2.2
  cryptography v2.6.1
  protobuf v3.7.1
  yowsup v3.2.3
  consonance v0.1.3-1

commit 7f336c7c300ffe00e04be339f029ff23679fa1c1

To Reproduce

  1. Run yowsup-cli demos -y, then login with /L
  2. Type something like /profile setStatus "проверка"

Expected behavior
Status has to be changed.

OS (please complete the following information):

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial

Python 3.5.2
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