{"action":"created","issue":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1038","repository_url":"https://api.github.com/repos/mitmproxy/mitmproxy","labels_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1038/labels{/name}","comments_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1038/comments","events_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1038/events","html_url":"https://github.com/mitmproxy/mitmproxy/issues/1038","id":141455346,"number":1038,"title":"bug report:UnicodeDecodeError","user":{"login":"bigfool","id":3033955,"avatar_url":"https://avatars.githubusercontent.com/u/3033955?v=3","gravatar_id":"","url":"https://api.github.com/users/bigfool","html_url":"https://github.com/bigfool","followers_url":"https://api.github.com/users/bigfool/followers","following_url":"https://api.github.com/users/bigfool/following{/other_user}","gists_url":"https://api.github.com/users/bigfool/gists{/gist_id}","starred_url":"https://api.github.com/users/bigfool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigfool/subscriptions","organizations_url":"https://api.github.com/users/bigfool/orgs","repos_url":"https://api.github.com/users/bigfool/repos","events_url":"https://api.github.com/users/bigfool/events{/privacy}","received_events_url":"https://api.github.com/users/bigfool/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-17T02:00:35Z","updated_at":"2016-03-24T08:02:42Z","closed_at":null,"body":"```\r\n##### \r\nTraceback (most recent call last):\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/__init__.py\", line 498, in run\r\n    self.loop.run()\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/main_loop.py\", line 278, in run\r\n    self._run()\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/main_loop.py\", line 376, in _run\r\n    self.event_loop.run()\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/main_loop.py\", line 682, in run\r\n    self._loop()\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/main_loop.py\", line 715, in _loop\r\n    alarm_callback()\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/main_loop.py\", line 164, in cb\r\n    callback(self, user_data)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/__init__.py\", line 451, in ticker\r\n    self.loop.draw_screen()\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/main_loop.py\", line 578, in draw_screen\r\n    canvas = self._topmost_widget.render(self.screen_size, focus=True)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/widget.py\", line 141, in cached_render\r\n    canv = fn(self, size, focus=focus)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/container.py\", line 1083, in render\r\n    focus and self.focus_part == 'body')\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/widget.py\", line 141, in cached_render\r\n    canv = fn(self, size, focus=focus)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/decoration.py\", line 225, in render\r\n    canv = self._original_widget.render(size, focus=focus)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/widget.py\", line 141, in cached_render\r\n    canv = fn(self, size, focus=focus)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/listbox.py\", line 457, in render\r\n    (maxcol, maxrow), focus=focus)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/urwid/listbox.py\", line 402, in calculate_visible\r\n    next, pos = self.body.get_next( pos )\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/flowlist.py\", line 298, in get_next\r\n    f = ConnectionItem(self.master, self.state, f, False) if f else None\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/flowlist.py\", line 112, in __init__\r\n    w = self.get_text()\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/flowlist.py\", line 120, in get_text\r\n    marked=self.state.flow_marked(self.flow)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/common.py\", line 443, in format_flow\r\n    tuple(sorted(d.items())), focus, extended\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/utils.py\", line 119, in get\r\n    ret = gen(*args)\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/common.py\", line 195, in raw_format_flow\r\n    resp.append(fcol(f[\"resp_ctype\"], rc))\r\n  File \"/Users/qizhenfang/Library/Python/2.7/lib/python/site-packages/libmproxy/console/common.py\", line 112, in fcol\r\n    s = unicode(s)\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xb5 in position 1: ordinal not in range(128)\r\n```\r\n\r\nMitmproxy Version: 0.16\r\nOperating System: OS X Yosemite 10.10.5"},"comment":{"url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/comments/200722471","html_url":"https://github.com/mitmproxy/mitmproxy/issues/1038#issuecomment-200722471","issue_url":"https://api.github.com/repos/mitmproxy/mitmproxy/issues/1038","id":200722471,"user":{"login":"patrickrbc","id":2023252,"avatar_url":"https://avatars.githubusercontent.com/u/2023252?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickrbc","html_url":"https://github.com/patrickrbc","followers_url":"https://api.github.com/users/patrickrbc/followers","following_url":"https://api.github.com/users/patrickrbc/following{/other_user}","gists_url":"https://api.github.com/users/patrickrbc/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickrbc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickrbc/subscriptions","organizations_url":"https://api.github.com/users/patrickrbc/orgs","repos_url":"https://api.github.com/users/patrickrbc/repos","events_url":"https://api.github.com/users/patrickrbc/events{/privacy}","received_events_url":"https://api.github.com/users/patrickrbc/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T08:02:42Z","updated_at":"2016-03-24T08:02:42Z","body":"`\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/mitmproxy\", line 65, in <module>\r\n    m.run()\r\n  File \"/Library/Python/2.7/site-packages/libmproxy/console/__init__.py\", line 594, in run\r\n    self.ui.run_wrapper(self.loop)\r\n  File \"/Library/Python/2.7/site-packages/urwid/raw_display.py\", line 268, in run_wrapper\r\n    return fn()\r\n  File \"/Library/Python/2.7/site-packages/libmproxy/console/__init__.py\", line 814, in loop\r\n    self.view.keypress(size, k)\r\n  File \"/Library/Python/2.7/site-packages/urwid/container.py\", line 1112, in keypress\r\n    return self.footer.keypress((maxcol,),key)\r\n  File \"/Library/Python/2.7/site-packages/urwid/container.py\", line 1583, in keypress\r\n    key = self.focus.keypress(tsize, key)\r\n  File \"/Library/Python/2.7/site-packages/urwid/widget.py\", line 1474, in keypress\r\n    self.insert_text(key)\r\n  File \"/Library/Python/2.7/site-packages/urwid/widget.py\", line 1398, in insert_text\r\n    text = self._normalize_to_caption(text)\r\n  File \"/Library/Python/2.7/site-packages/urwid/widget.py\", line 1415, in _normalize_to_caption\r\n    return text.decode('ascii')\r\nUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)\r\n`\r\n\r\nI receive this error everytime I try to insert characters like \"ã\" or \"á\"."}}