{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipython/issues/10348","repository_url":"https://api.github.com/repos/ipython/ipython","labels_url":"https://api.github.com/repos/ipython/ipython/issues/10348/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipython/issues/10348/comments","events_url":"https://api.github.com/repos/ipython/ipython/issues/10348/events","html_url":"https://github.com/ipython/ipython/issues/10348","id":210428864,"number":10348,"title":"Getting help (?) on expression crashes the session","user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars.githubusercontent.com/u/1020496?v=3","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/ipython/ipython/milestones/11","html_url":"https://github.com/ipython/ipython/milestone/11","labels_url":"https://api.github.com/repos/ipython/ipython/milestones/11/labels","id":247447,"number":11,"title":"no action","description":"A milestone for closed or open issues for which there is no action needed.\r\n\r\n- duplicate\r\n- not a bug\r\n- just a question / discussion, nothing to resolve\r\n- wontfix\r\n- etc.","creator":{"login":"minrk","id":151929,"avatar_url":"https://avatars.githubusercontent.com/u/151929?v=3","gravatar_id":"","url":"https://api.github.com/users/minrk","html_url":"https://github.com/minrk","followers_url":"https://api.github.com/users/minrk/followers","following_url":"https://api.github.com/users/minrk/following{/other_user}","gists_url":"https://api.github.com/users/minrk/gists{/gist_id}","starred_url":"https://api.github.com/users/minrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/minrk/subscriptions","organizations_url":"https://api.github.com/users/minrk/orgs","repos_url":"https://api.github.com/users/minrk/repos","events_url":"https://api.github.com/users/minrk/events{/privacy}","received_events_url":"https://api.github.com/users/minrk/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":2291,"state":"open","created_at":"2013-01-19T01:33:01Z","updated_at":"2017-02-27T12:18:00Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2017-02-27T09:26:11Z","updated_at":"2017-02-27T12:56:03Z","closed_at":"2017-02-27T12:17:54Z","body":"With the latest IPython, if you do something like (both are cases where you type `?` after an 'expression' or something that has to be evaluated first):\r\n\r\n```\r\nIn [1]: d = {'a': 'str'}\r\nIn [2]: d['a'].capitalize?\r\n```\r\n\r\nor \r\n\r\n```\r\nIn [1]: import os\r\nIn [2]: d = os.listdir?\r\n```\r\n\r\nthe session crashes:\r\n\r\n```\r\n(dev) joris@joris-XPS-13-9350:~/scipy$ ipython\r\nPython 3.5.2 |Continuum Analytics, Inc.| (default, Jul  2 2016, 17:53:06) \r\nType \"copyright\", \"credits\" or \"license\" for more information.\r\n\r\nIPython 5.2.2 -- An enhanced Interactive Python.\r\n?         -> Introduction and overview of IPython's features.\r\n%quickref -> Quick reference.\r\nhelp      -> Python's own help system.\r\nobject?   -> Details about 'object', use 'object??' for extra details.\r\n\r\nIn [1]: d = {'a': 'str'}\r\n\r\nIn [2]: d['a'].capitalize?\r\nObject `capitalize` not found.\r\n\r\nIn [3]: d['a'].capitalize?                                                                                                                                                                                  \r\nTraceback (most recent call last):\r\n  File \"/home/joris/miniconda3/envs/dev/bin/ipython\", line 6, in <module>\r\n    sys.exit(IPython.start_ipython())\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/IPython/__init__.py\", line 119, in start_ipython\r\n    return launch_new_instance(argv=argv, **kwargs)\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/traitlets/config/application.py\", line 658, in launch_instance\r\n    app.start()\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/IPython/terminal/ipapp.py\", line 348, in start\r\n    self.shell.mainloop()\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py\", line 455, in mainloop\r\n    self.interact()\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py\", line 438, in interact\r\n    code = self.prompt_for_code()\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py\", line 343, in prompt_for_code\r\n    pre_run=self.pre_prompt, reset_current_buffer=True)\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/prompt_toolkit/interface.py\", line 408, in run\r\n    self._pre_run(pre_run)\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/prompt_toolkit/interface.py\", line 383, in _pre_run\r\n    pre_run()\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/IPython/terminal/interactiveshell.py\", line 425, in pre_prompt\r\n    self.pt_cli.application.buffer.text = cast_unicode_py2(self.rl_next_input)\r\n  File \"/home/joris/miniconda3/envs/dev/lib/python3.5/site-packages/prompt_toolkit/buffer.py\", line 371, in text\r\n    assert self.cursor_position <= len(value)\r\nAssertionError\r\n\r\nIf you suspect this is an IPython bug, please report it at:\r\n    https://github.com/ipython/ipython/issues\r\nor send an email to the mailing list at ipython-dev@scipy.org\r\n\r\nYou can print a more detailed traceback right now with \"%tb\", or use \"%debug\"\r\nto interactively debug it.\r\n\r\nExtra-detailed tracebacks for bug-reporting purposes can be enabled via:\r\n    %config Application.verbose_crash=True\r\n\r\n(dev) joris@joris-XPS-13-9350:~/scipy$\r\n```\r\n\r\nTo clarify, the `In [3] ..` I didn't type myself (I typed up to `In [2]`), and is also greyed out. \r\n\r\nUp to IPython 5.1, this just gave only the \"Object `capitalize` not found.\" without crashing the session. So apparently a regression in IPython 5.2\r\n\r\nUsing IPython 5.2.2 and prompt_toolkit 1.0.13, both from conda-forge."},"comment":{"url":"https://api.github.com/repos/ipython/ipython/issues/comments/282711859","html_url":"https://github.com/ipython/ipython/issues/10348#issuecomment-282711859","issue_url":"https://api.github.com/repos/ipython/ipython/issues/10348","id":282711859,"user":{"login":"jorisvandenbossche","id":1020496,"avatar_url":"https://avatars.githubusercontent.com/u/1020496?v=3","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"created_at":"2017-02-27T12:56:03Z","updated_at":"2017-02-27T12:56:03Z","body":"And I see now that I should have looked in the reported issues first ... there were already multiple :-)"}}
{"actor":{"display_login":"jorisvandenbossche"}}