{"action":"opened","number":192,"pull_request":{"url":"https://api.github.com/repos/inducer/pudb/pulls/192","id":76332980,"html_url":"https://github.com/inducer/pudb/pull/192","diff_url":"https://github.com/inducer/pudb/pull/192.diff","patch_url":"https://github.com/inducer/pudb/pull/192.patch","issue_url":"https://api.github.com/repos/inducer/pudb/issues/192","number":192,"state":"open","locked":false,"title":"Fixed issue with debugging apps with non-ascii data","user":{"login":"mlubimow","id":2325687,"avatar_url":"https://avatars.githubusercontent.com/u/2325687?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubimow","html_url":"https://github.com/mlubimow","followers_url":"https://api.github.com/users/mlubimow/followers","following_url":"https://api.github.com/users/mlubimow/following{/other_user}","gists_url":"https://api.github.com/users/mlubimow/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubimow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubimow/subscriptions","organizations_url":"https://api.github.com/users/mlubimow/orgs","repos_url":"https://api.github.com/users/mlubimow/repos","events_url":"https://api.github.com/users/mlubimow/events{/privacy}","received_events_url":"https://api.github.com/users/mlubimow/received_events","type":"User","site_admin":false},"body":"Currently, there is an issue with remote debugging apps which have non-ascii data (in variables, for example):\r\n\r\n\r\n```\r\n# -*- coding: utf-8 -*-\r\n\r\nfrom pudb.remote import set_trace\r\n\r\nd = {'key': 'żółta jaźń'}\r\n\r\nset_trace(term_size=(80, 24))\r\n```\r\n\r\nOriginally fails with:\r\n\r\n```\r\n  File \"/usr/lib/python2.7/bdb.py\", line 49, in trace_dispatch\r\n    return self.dispatch_line(frame)\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/pudb/debugger.py\", line 173, in dispatch_line\r\n    self.user_line(frame)\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/pudb/debugger.py\", line 376, in user_line\r\n    self.interaction(frame)\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/pudb/debugger.py\", line 344, in interaction\r\n    show_exc_dialog=show_exc_dialog)\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/pudb/debugger.py\", line 2084, in call_with_ui\r\n    return f(*args, **kwargs)\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/pudb/debugger.py\", line 2301, in interaction\r\n    self.event_loop()\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/pudb/debugger.py\", line 2260, in event_loop\r\n    self.screen.draw_screen(self.size, canvas)\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/urwid/raw_display.py\", line 838, in draw_screen\r\n    self.write(l)\r\n  File \"/home/m/Projekty/test/local/lib/python2.7/site-packages/urwid/raw_display.py\", line 268, in write\r\n    self._term_output_file.write(data)\r\n  File \"/home/m/Projekty/test/lib/python2.7/codecs.py\", line 706, in write\r\n    return self.writer.write(data)\r\n  File \"/home/m/Projekty/test/lib/python2.7/codecs.py\", line 369, in write\r\n    data, consumed = self.encode(object, self.errors)\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 1: ordinal not in range(128)\r\n```\r\n\r\nI suspect its because StreamReaderWriter is using default encoder and decoder which is \"ascii\". After fixing encoder and decoder, example case works fine.\r\n","created_at":"2016-07-05T19:57:08Z","updated_at":"2016-07-05T19:57:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/inducer/pudb/pulls/192/commits","review_comments_url":"https://api.github.com/repos/inducer/pudb/pulls/192/comments","review_comment_url":"https://api.github.com/repos/inducer/pudb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/inducer/pudb/issues/192/comments","statuses_url":"https://api.github.com/repos/inducer/pudb/statuses/61a728ba6711afb66d84d1d7aed78f8a0cb1d109","head":{"label":"mlubimow:master---fix_remote_non_ascii_issue","ref":"master---fix_remote_non_ascii_issue","sha":"61a728ba6711afb66d84d1d7aed78f8a0cb1d109","user":{"login":"mlubimow","id":2325687,"avatar_url":"https://avatars.githubusercontent.com/u/2325687?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubimow","html_url":"https://github.com/mlubimow","followers_url":"https://api.github.com/users/mlubimow/followers","following_url":"https://api.github.com/users/mlubimow/following{/other_user}","gists_url":"https://api.github.com/users/mlubimow/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubimow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubimow/subscriptions","organizations_url":"https://api.github.com/users/mlubimow/orgs","repos_url":"https://api.github.com/users/mlubimow/repos","events_url":"https://api.github.com/users/mlubimow/events{/privacy}","received_events_url":"https://api.github.com/users/mlubimow/received_events","type":"User","site_admin":false},"repo":{"id":62664826,"name":"pudb","full_name":"mlubimow/pudb","owner":{"login":"mlubimow","id":2325687,"avatar_url":"https://avatars.githubusercontent.com/u/2325687?v=3","gravatar_id":"","url":"https://api.github.com/users/mlubimow","html_url":"https://github.com/mlubimow","followers_url":"https://api.github.com/users/mlubimow/followers","following_url":"https://api.github.com/users/mlubimow/following{/other_user}","gists_url":"https://api.github.com/users/mlubimow/gists{/gist_id}","starred_url":"https://api.github.com/users/mlubimow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlubimow/subscriptions","organizations_url":"https://api.github.com/users/mlubimow/orgs","repos_url":"https://api.github.com/users/mlubimow/repos","events_url":"https://api.github.com/users/mlubimow/events{/privacy}","received_events_url":"https://api.github.com/users/mlubimow/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mlubimow/pudb","description":"Full-screen console debugger for Python","fork":true,"url":"https://api.github.com/repos/mlubimow/pudb","forks_url":"https://api.github.com/repos/mlubimow/pudb/forks","keys_url":"https://api.github.com/repos/mlubimow/pudb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mlubimow/pudb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mlubimow/pudb/teams","hooks_url":"https://api.github.com/repos/mlubimow/pudb/hooks","issue_events_url":"https://api.github.com/repos/mlubimow/pudb/issues/events{/number}","events_url":"https://api.github.com/repos/mlubimow/pudb/events","assignees_url":"https://api.github.com/repos/mlubimow/pudb/assignees{/user}","branches_url":"https://api.github.com/repos/mlubimow/pudb/branches{/branch}","tags_url":"https://api.github.com/repos/mlubimow/pudb/tags","blobs_url":"https://api.github.com/repos/mlubimow/pudb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mlubimow/pudb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mlubimow/pudb/git/refs{/sha}","trees_url":"https://api.github.com/repos/mlubimow/pudb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mlubimow/pudb/statuses/{sha}","languages_url":"https://api.github.com/repos/mlubimow/pudb/languages","stargazers_url":"https://api.github.com/repos/mlubimow/pudb/stargazers","contributors_url":"https://api.github.com/repos/mlubimow/pudb/contributors","subscribers_url":"https://api.github.com/repos/mlubimow/pudb/subscribers","subscription_url":"https://api.github.com/repos/mlubimow/pudb/subscription","commits_url":"https://api.github.com/repos/mlubimow/pudb/commits{/sha}","git_commits_url":"https://api.github.com/repos/mlubimow/pudb/git/commits{/sha}","comments_url":"https://api.github.com/repos/mlubimow/pudb/comments{/number}","issue_comment_url":"https://api.github.com/repos/mlubimow/pudb/issues/comments{/number}","contents_url":"https://api.github.com/repos/mlubimow/pudb/contents/{+path}","compare_url":"https://api.github.com/repos/mlubimow/pudb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mlubimow/pudb/merges","archive_url":"https://api.github.com/repos/mlubimow/pudb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mlubimow/pudb/downloads","issues_url":"https://api.github.com/repos/mlubimow/pudb/issues{/number}","pulls_url":"https://api.github.com/repos/mlubimow/pudb/pulls{/number}","milestones_url":"https://api.github.com/repos/mlubimow/pudb/milestones{/number}","notifications_url":"https://api.github.com/repos/mlubimow/pudb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mlubimow/pudb/labels{/name}","releases_url":"https://api.github.com/repos/mlubimow/pudb/releases{/id}","deployments_url":"https://api.github.com/repos/mlubimow/pudb/deployments","created_at":"2016-07-05T19:46:38Z","updated_at":"2016-07-05T19:46:39Z","pushed_at":"2016-07-05T19:50:20Z","git_url":"git://github.com/mlubimow/pudb.git","ssh_url":"git@github.com:mlubimow/pudb.git","clone_url":"https://github.com/mlubimow/pudb.git","svn_url":"https://github.com/mlubimow/pudb","homepage":"http://mathema.tician.de/software/pudb","size":1024,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"inducer:master","ref":"master","sha":"255f318fbb61f008fe7cffd4e5df1fc31c84211c","user":{"login":"inducer","id":352067,"avatar_url":"https://avatars.githubusercontent.com/u/352067?v=3","gravatar_id":"","url":"https://api.github.com/users/inducer","html_url":"https://github.com/inducer","followers_url":"https://api.github.com/users/inducer/followers","following_url":"https://api.github.com/users/inducer/following{/other_user}","gists_url":"https://api.github.com/users/inducer/gists{/gist_id}","starred_url":"https://api.github.com/users/inducer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inducer/subscriptions","organizations_url":"https://api.github.com/users/inducer/orgs","repos_url":"https://api.github.com/users/inducer/repos","events_url":"https://api.github.com/users/inducer/events{/privacy}","received_events_url":"https://api.github.com/users/inducer/received_events","type":"User","site_admin":false},"repo":{"id":1745896,"name":"pudb","full_name":"inducer/pudb","owner":{"login":"inducer","id":352067,"avatar_url":"https://avatars.githubusercontent.com/u/352067?v=3","gravatar_id":"","url":"https://api.github.com/users/inducer","html_url":"https://github.com/inducer","followers_url":"https://api.github.com/users/inducer/followers","following_url":"https://api.github.com/users/inducer/following{/other_user}","gists_url":"https://api.github.com/users/inducer/gists{/gist_id}","starred_url":"https://api.github.com/users/inducer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inducer/subscriptions","organizations_url":"https://api.github.com/users/inducer/orgs","repos_url":"https://api.github.com/users/inducer/repos","events_url":"https://api.github.com/users/inducer/events{/privacy}","received_events_url":"https://api.github.com/users/inducer/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/inducer/pudb","description":"Full-screen console debugger for Python","fork":false,"url":"https://api.github.com/repos/inducer/pudb","forks_url":"https://api.github.com/repos/inducer/pudb/forks","keys_url":"https://api.github.com/repos/inducer/pudb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/inducer/pudb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/inducer/pudb/teams","hooks_url":"https://api.github.com/repos/inducer/pudb/hooks","issue_events_url":"https://api.github.com/repos/inducer/pudb/issues/events{/number}","events_url":"https://api.github.com/repos/inducer/pudb/events","assignees_url":"https://api.github.com/repos/inducer/pudb/assignees{/user}","branches_url":"https://api.github.com/repos/inducer/pudb/branches{/branch}","tags_url":"https://api.github.com/repos/inducer/pudb/tags","blobs_url":"https://api.github.com/repos/inducer/pudb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/inducer/pudb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/inducer/pudb/git/refs{/sha}","trees_url":"https://api.github.com/repos/inducer/pudb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/inducer/pudb/statuses/{sha}","languages_url":"https://api.github.com/repos/inducer/pudb/languages","stargazers_url":"https://api.github.com/repos/inducer/pudb/stargazers","contributors_url":"https://api.github.com/repos/inducer/pudb/contributors","subscribers_url":"https://api.github.com/repos/inducer/pudb/subscribers","subscription_url":"https://api.github.com/repos/inducer/pudb/subscription","commits_url":"https://api.github.com/repos/inducer/pudb/commits{/sha}","git_commits_url":"https://api.github.com/repos/inducer/pudb/git/commits{/sha}","comments_url":"https://api.github.com/repos/inducer/pudb/comments{/number}","issue_comment_url":"https://api.github.com/repos/inducer/pudb/issues/comments{/number}","contents_url":"https://api.github.com/repos/inducer/pudb/contents/{+path}","compare_url":"https://api.github.com/repos/inducer/pudb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/inducer/pudb/merges","archive_url":"https://api.github.com/repos/inducer/pudb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/inducer/pudb/downloads","issues_url":"https://api.github.com/repos/inducer/pudb/issues{/number}","pulls_url":"https://api.github.com/repos/inducer/pudb/pulls{/number}","milestones_url":"https://api.github.com/repos/inducer/pudb/milestones{/number}","notifications_url":"https://api.github.com/repos/inducer/pudb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/inducer/pudb/labels{/name}","releases_url":"https://api.github.com/repos/inducer/pudb/releases{/id}","deployments_url":"https://api.github.com/repos/inducer/pudb/deployments","created_at":"2011-05-13T23:44:30Z","updated_at":"2016-07-05T00:31:01Z","pushed_at":"2016-06-27T15:29:34Z","git_url":"git://github.com/inducer/pudb.git","ssh_url":"git@github.com:inducer/pudb.git","clone_url":"https://github.com/inducer/pudb.git","svn_url":"https://github.com/inducer/pudb","homepage":"http://mathema.tician.de/software/pudb","size":1024,"stargazers_count":605,"watchers_count":605,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":68,"forks":60,"open_issues":68,"watchers":605,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/inducer/pudb/pulls/192"},"html":{"href":"https://github.com/inducer/pudb/pull/192"},"issue":{"href":"https://api.github.com/repos/inducer/pudb/issues/192"},"comments":{"href":"https://api.github.com/repos/inducer/pudb/issues/192/comments"},"review_comments":{"href":"https://api.github.com/repos/inducer/pudb/pulls/192/comments"},"review_comment":{"href":"https://api.github.com/repos/inducer/pudb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/inducer/pudb/pulls/192/commits"},"statuses":{"href":"https://api.github.com/repos/inducer/pudb/statuses/61a728ba6711afb66d84d1d7aed78f8a0cb1d109"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":1,"changed_files":1}}
{"actor":{"display_login":"mlubimow"}}