Skip to content

Unicode issue #27

Description

@item4

Hello. I'm using Korean and I tried notify error messages to our dev room. But it's not work.

It's traceback.

Error processing 'post_process' on 'HipchatMessage': 'ascii' codec can't encode characters in position 15-16: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/trex/.virtualenvs/sentry/local/lib/python2.7/site-packages/sentry/utils/safe.py", line 19, in safe_execute
    result = func(*args, **kwargs)
  File "/home/trex/.virtualenvs/sentry/local/lib/python2.7/site-packages/sentry_hipchat/models.py", line 91, in post_process
    }, notify, color=COLORS.get(level, 'purple'))
  File "/home/trex/.virtualenvs/sentry/local/lib/python2.7/site-packages/sentry_hipchat/models.py", line 103, in send_payload
    data = urllib.urlencode(values)
  File "/usr/lib/python2.7/urllib.py", line 1332, in urlencode
    v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-16: ordinal not in range(128)
Error processing 'post_process' on 'HipchatMessage': 'ascii' codec can't encode characters in position 15-16: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/trex/.virtualenvs/sentry/local/lib/python2.7/site-packages/sentry/utils/safe.py", line 19, in safe_execute
    result = func(*args, **kwargs)
  File "/home/trex/.virtualenvs/sentry/local/lib/python2.7/site-packages/sentry_hipchat/models.py", line 91, in post_process
    }, notify, color=COLORS.get(level, 'purple'))
  File "/home/trex/.virtualenvs/sentry/local/lib/python2.7/site-packages/sentry_hipchat/models.py", line 103, in send_payload
    data = urllib.urlencode(values)
  File "/usr/lib/python2.7/urllib.py", line 1332, in urlencode
    v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 15-16: ordinal not in range(128)

I configed like this.

Token: SECRET
Room: ReadyApp
checked Notify
checked Include project name

I think if project names contain non-ascii character, it occur error(I tried only alphabet project name. it was not occur error.) and it will can fix by .encode('utf-8').

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions