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

utf8 issue #7

Closed
fritz-smh opened this issue Jan 26, 2017 · 1 comment
Closed

utf8 issue #7

fritz-smh opened this issue Jan 26, 2017 · 1 comment

Comments

@fritz-smh
Copy link

In develop branch, you may add a u"" for all strings.

See the error :

2017-01-26 21:54:24,840 domogik-notify DEBUG Device list refreshed: [{u'info_changed': u'2017-01-26 21:52:01', u'commands': {u'send_msg': {u'return_confirmation': True, u'id': 59, u'parameters': [{u'conversion': u'', u'key': u'body', u'data_type': u'DT_String'}], u'name': u'Send a message'}}, u'description': u'', u'reference': u'', u'xpl_stats': {}, u'xpl_commands': {}, u'client_version': u'0.3.0', u'client_id': u'plugin-notify.ambre', u'device_type_id': u'notify.smsweb', u'sensors': {u'error_send': {u'conversion': u'', u'value_min': None, u'data_type': u'DT_String', u'reference': u'error_send', u'last_received': None, u'value_max': None, u'incremental': False, u'timeout': 0, u'formula': None, u'last_value': None, u'id': 500, u'name': u'Message error send'}, u'msg_status': {u'conversion': u'', u'value_min': None, u'data_type': u'DT_String', u'reference': u'msg_status', u'last_received': None, u'value_max': None, u'incremental': False, u'timeout': 0, u'formula': None, u'last_value': None, u'id': 499, u'name': u'Message status send '}}, u'parameters': {u'operator': {u'key': u'operator', u'type': u'choice', u'id': 81, u'value': u'Freemobile_sms-web'}, u'to': {u'key': u'to', u'type': u'string', u'id': 80, u'value': u'0688459268'}, u'login': {u'key': u'login', u'type': u'string', u'id': 82, u'value': u'xxxxxx'}, u'pwd': {u'key': u'pwd', u'type': u'password', u'id': 83, u'value': u'xxxxx'}}, u'id': 114, u'name': u'T\xe9l\xe9phone xxxx'}]
2017-01-26 21:54:24,841 domogik-notify INFO Manager Notify Clients is ready.
2017-01-26 21:54:24,842 domogik-notify ERROR Traceback (most recent call last):
  File "bin/notify.py", line 76, in __init__
    if self.managerClients.addClient(a_device) :
  File "/var/lib/domogik/domogik_packages/plugin_notify/lib/notify.py", line 43, in addClient
    name = getClientId(instance)
  File "/var/lib/domogik/domogik_packages/plugin_notify/lib/notify_client.py", line 57, in getClientId
    return "{0}_{1}".format(device['name'], + device['id'])
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 1: ordinal not in range(128)
@Nico0084
Copy link
Owner

Goups, don't thinks it's an utf issue for this bug ( typo python error) and no need string unicode on this internal plugin param.
I had forget to push the fix ! sorry
Closed by 451958b

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