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

PagerDuty destination multi-byte error #4008

Merged
merged 1 commit into from
Jul 24, 2019

Conversation

katty0324
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Bug Fix

Description

PagerDuty alert destination ends in error when query name contains multibyte characters.

[2019-07-22 09:21:52,077][PID:132][ERROR][ForkPoolWorker-29] task_name=redash.tasks.check_alerts_for_query task_id=c806feed-ea79-4251-bb95-a80712cda707 Error with processing destination
Traceback (most recent call last):
File "/app/redash/tasks/alerts.py", line 23, in notify_subscriptions
subscription.notify(alert, alert.query_rel, subscription.user, new_state, current_app, host)
File "/app/redash/models/__init__.py", line 1125, in notify
app, host)
File "/app/redash/models/__init__.py", line 1083, in notify
app, host, self.options)
File "/app/redash/destinations/pagerduty.py", line 44, in notify
default_desc = self.DESCRIPTION_STR.format(query_id=query.id, query_name=query.name)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 8-20: ordinal not in range(128)

Related Tickets & Documents

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

No UI changes

Copy link
Member

@arikfr arikfr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@arikfr arikfr merged commit c518c7a into getredash:master Jul 24, 2019
harveyrendell pushed a commit to pushpay/redash that referenced this pull request Nov 14, 2019
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

Successfully merging this pull request may close these issues.

2 participants