{"action":"opened","issue":{"url":"https://api.github.com/repos/SeTeM/pync/issues/42","repository_url":"https://api.github.com/repos/SeTeM/pync","labels_url":"https://api.github.com/repos/SeTeM/pync/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/SeTeM/pync/issues/42/comments","events_url":"https://api.github.com/repos/SeTeM/pync/issues/42/events","html_url":"https://github.com/SeTeM/pync/issues/42","id":370245546,"node_id":"MDU6SXNzdWUzNzAyNDU1NDY=","number":42,"title":"Unicode/ASCII Encoding/decoding of messages when receiving notifications from weechat","user":{"login":"megalithic","id":3678,"node_id":"MDQ6VXNlcjM2Nzg=","avatar_url":"https://avatars1.githubusercontent.com/u/3678?v=4","gravatar_id":"","url":"https://api.github.com/users/megalithic","html_url":"https://github.com/megalithic","followers_url":"https://api.github.com/users/megalithic/followers","following_url":"https://api.github.com/users/megalithic/following{/other_user}","gists_url":"https://api.github.com/users/megalithic/gists{/gist_id}","starred_url":"https://api.github.com/users/megalithic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/megalithic/subscriptions","organizations_url":"https://api.github.com/users/megalithic/orgs","repos_url":"https://api.github.com/users/megalithic/repos","events_url":"https://api.github.com/users/megalithic/events{/privacy}","received_events_url":"https://api.github.com/users/megalithic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-15T16:33:57Z","updated_at":"2018-10-15T16:33:57Z","closed_at":null,"author_association":"NONE","body":"**Describe the bug**\r\n\r\nOn macOS 10.13.6 (high sierra), using the latest pync installed via github, the latest version of weechat, the latest notification_center.py weechat plugin installed via `/script` command in weechat, and latest terminal-notifier (using either the ruby gem or the homebrew formula).\r\n\r\nI get the following error:\r\n\r\n```\r\n11:15 python: stdout/stderr (notification_center): Traceback (most recent call last):\r\n11:15 python: stdout/stderr (notification_center):   File \"/Users/me/.dotfiles/private/weechat/python/autoload/notification_center.py\", line 63, in notify\r\n11:15 python: stdout/stderr (notification_center):     Notifier.notify('From %s' % prefix, title='Private Message', sound=sound, appIcon=WEECHAT_ICON, activate=activate_bundle_id)\r\n11:15 python: stdout/stderr (notification_center):   File \"/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pync/TerminalNotifier.py\", line 73, in notify\r\n11:15 python: stdout/stderr (notification_center):     message = message.encode('utf-8')\r\n11:15 python: stdout/stderr (notification_center): UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 5: ordinal not in range(128)\r\n11:15 ⚠ python: error in function \"notify\"\r\n``\r\n**Desktop (please complete the following information):**\r\n\r\n - OS: macOS\r\n - Version 10.13.6\r\n - kitty: 0.12.3\r\n - tmux: 2.7\r\n - zsh: 5.6.2\r\n - weechat: 2.3\r\n - pync: 2.0.4\r\n - notification_center.py: 1.3.0\r\n - terminal-notifier: 2.0.0\r\n\r\n**To Reproduce**\r\n\r\nSteps to reproduce the behavior:\r\n1. Install weechat, pync, terminal-notifier, and the notification_center.py plugin versions shown above (those are all the latest versions as of the writing of this issue).\r\n1. Have someone `@` you, or DM you, or what not within IRC, whatever bitlbee or other server source you might be using.\r\n1. Without fail, the above error occurs.\r\n\r\n**Expected behavior**\r\n\r\nI would expect the notification to popup, I can call `terminal-notifier` directly from a term prompt and it raises a notification (using the basic example on their repo: `echo 'Piped Message Data!' | terminal-notifier -sound default`. \r\n\r\n\r\n**Additional context**\r\n\r\nI tried fiddling with the notification_center.py plugin to see if i can add more logging or more encoding/decoding for unicode and/or ascii or other file format types (trying the things others on stackoverflow and other github repos have suggested to work around this), but to no avail. I still end up with an error from `pync`."}}
{"actor":{"display_login":"megalithic"}}