{"action":"created","issue":{"url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/123","labels_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/123/comments","events_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/123/events","html_url":"https://github.com/jonathanslenders/python-prompt-toolkit/issues/123","id":84226188,"number":123,"title":"REPL tutorial fails in Python 2.7","user":{"login":"lillian27","id":2107631,"avatar_url":"https://avatars.githubusercontent.com/u/2107631?v=3","gravatar_id":"","url":"https://api.github.com/users/lillian27","html_url":"https://github.com/lillian27","followers_url":"https://api.github.com/users/lillian27/followers","following_url":"https://api.github.com/users/lillian27/following{/other_user}","gists_url":"https://api.github.com/users/lillian27/gists{/gist_id}","starred_url":"https://api.github.com/users/lillian27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lillian27/subscriptions","organizations_url":"https://api.github.com/users/lillian27/orgs","repos_url":"https://api.github.com/users/lillian27/repos","events_url":"https://api.github.com/users/lillian27/events{/privacy}","received_events_url":"https://api.github.com/users/lillian27/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-02T21:45:42Z","updated_at":"2015-06-03T18:14:40Z","closed_at":"2015-06-03T18:14:40Z","body":"Code provided for initial step in REPL tutorial fails in Python 2.7 (clean virtualenv, only prompt_toolkit and deps installed):\r\n\r\n```python\r\nfrom prompt_toolkit.shortcuts import get_input\r\n\r\ndef main():\r\n    text = get_input(\"> \")\r\n    print('You entered:', text)\r\n\r\nif __name__ == '__main__':\r\n    main()\r\n```\r\n\r\n>File \"/Users/lillian/Documents/Projects/st_p2x/lib/python2.7/site-packages/prompt_toolkit/shortcuts.py\", line 266, in get_input\r\n    application=create_default_application(message, **kwargs),\r\n  File \"/Users/lillian/Documents/Projects/st_p2x/lib/python2.7/site-packages/prompt_toolkit/shortcuts.py\", line 239, in create_default_application\r\n    extra_input_processors=extra_input_processors),\r\n  File \"/Users/lillian/Documents/Projects/st_p2x/lib/python2.7/site-packages/prompt_toolkit/shortcuts.py\", line 122, in create_default_layout\r\n    assert isinstance(message, text_type)\r\nAssertionError\r\n>\r\n\r\nThis same code works as advertised in Python 3.4"},"comment":{"url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/comments/108553480","html_url":"https://github.com/jonathanslenders/python-prompt-toolkit/issues/123#issuecomment-108553480","issue_url":"https://api.github.com/repos/jonathanslenders/python-prompt-toolkit/issues/123","id":108553480,"user":{"login":"jonathanslenders","id":216638,"avatar_url":"https://avatars.githubusercontent.com/u/216638?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathanslenders","html_url":"https://github.com/jonathanslenders","followers_url":"https://api.github.com/users/jonathanslenders/followers","following_url":"https://api.github.com/users/jonathanslenders/following{/other_user}","gists_url":"https://api.github.com/users/jonathanslenders/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathanslenders/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathanslenders/subscriptions","organizations_url":"https://api.github.com/users/jonathanslenders/orgs","repos_url":"https://api.github.com/users/jonathanslenders/repos","events_url":"https://api.github.com/users/jonathanslenders/events{/privacy}","received_events_url":"https://api.github.com/users/jonathanslenders/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T18:14:40Z","updated_at":"2015-06-03T18:14:40Z","body":"Hi @blueyed,\r\n\r\nThanks for reporting! The problem was the missing``from __future__ import unicode_literals`` import.\r\nI fixed it in the tutorial.\r\n\r\nJonathan"}}