{"action":"closed","issue":{"url":"https://api.github.com/repos/embolalia/willie/issues/724","labels_url":"https://api.github.com/repos/embolalia/willie/issues/724/labels{/name}","comments_url":"https://api.github.com/repos/embolalia/willie/issues/724/comments","events_url":"https://api.github.com/repos/embolalia/willie/issues/724/events","html_url":"https://github.com/embolalia/willie/issues/724","id":55783921,"number":724,"title":"Wikipedia urls with special characters result in an error","user":{"login":"Tomin1","id":1296298,"avatar_url":"https://avatars.githubusercontent.com/u/1296298?v=3","gravatar_id":"","url":"https://api.github.com/users/Tomin1","html_url":"https://github.com/Tomin1","followers_url":"https://api.github.com/users/Tomin1/followers","following_url":"https://api.github.com/users/Tomin1/following{/other_user}","gists_url":"https://api.github.com/users/Tomin1/gists{/gist_id}","starred_url":"https://api.github.com/users/Tomin1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tomin1/subscriptions","organizations_url":"https://api.github.com/users/Tomin1/orgs","repos_url":"https://api.github.com/users/Tomin1/repos","events_url":"https://api.github.com/users/Tomin1/events{/privacy}","received_events_url":"https://api.github.com/users/Tomin1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/embolalia/willie/labels/Bug","name":"Bug","color":"FFA500"},{"url":"https://api.github.com/repos/embolalia/willie/labels/Easyfix","name":"Easyfix","color":"02d7e1"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-28T17:01:36Z","updated_at":"2015-02-15T15:00:00Z","closed_at":"2015-02-15T15:00:00Z","body":"I get this error:\r\n```\r\n18:29 <Willie> KeyError: u'extract' (file \r\n\"/usr/local/lib/python2.7/dist-packages/willie/modules/wikipedia.py\", line 83, \r\n               in mw_snippet)\r\n```\r\nWhen I give Wille an url like this: http://en.wikipedia.org/wiki/Troll_%28Internet%29\r\nThe reason are the percent encoded characters in the url. To fix this I made some modifications to my wikipedia.py but they are not compatible with Python 2, I think, and might not be the proper way to solve this problem. To see the code I wrote see this commit: https://github.com/Tomin1/willie/commit/019848763594da688ae6ed79e180373d8c472694 Anyway I think more time and thinking about this problem is needed and this fix is not final and should not be merged.\r\n\r\nSome more information:\r\nexceptions.log:\r\n```\r\nSignature: KeyError: u'extract' (file \"/usr/local/lib/python2.7/dist-packages/willie/modules/wikipedia.py\", line 83, in mw_snippet)\r\nfrom Tomi at 2015-01-28 18:29:59.907542. Message was: http://en.wikipedia.org/wiki/Troll_%28Internet%29\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/willie/bot.py\", line 634, in call\r\n    exit_code = func(willie, trigger)\r\n  File \"/usr/local/lib/python2.7/dist-packages/willie/modules/wikipedia.py\", line 93, in mw_info\r\n    say_snippet(bot, match.group(1), match.group(2), show_url=False)\r\n  File \"/usr/local/lib/python2.7/dist-packages/willie/modules/wikipedia.py\", line 60, in say_snippet\r\n    snippet = mw_snippet(server, query)\r\n  File \"/usr/local/lib/python2.7/dist-packages/willie/modules/wikipedia.py\", line 83, in mw_snippet\r\n    return snippet['extract']\r\nKeyError: u'extract'\r\n```\r\n\r\nWillie v. 5.0.0\r\nRaspbian (Debian wheezy) on Raspberry Pi, installed with pip. "}}