Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPython 5.0.0b2 AssertionError from within prompt_toolkit.buffer #9592

Closed
ericdill opened this issue Jun 9, 2016 · 3 comments
Closed

IPython 5.0.0b2 AssertionError from within prompt_toolkit.buffer #9592

ericdill opened this issue Jun 9, 2016 · 3 comments
Milestone

Comments

@ericdill
Copy link

ericdill commented Jun 9, 2016

Looks like IPython will crash if have fully typed out the word you want, but try to tab-complete anyway and then you press again to unselect the tab-completion dialog.

Example:

  1. type "Import IPython" in IPython
  2. press to enable tab-completion
  3. press again to unselect the tab-completion
  4. press

Here's a console screencast that shows the replication steps for this bug: https://asciinema.org/a/7890yzftp8lzdjzxasrpvdnil

And the stacktrace:

Traceback (most recent call last):
  File "/tmp/foo/bin/ipython", line 11, in <module>
    sys.exit(start_ipython())
  File "/tmp/foo/lib/python3.5/site-packages/IPython/__init__.py", line 119, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/tmp/foo/lib/python3.5/site-packages/traitlets/config/application.py", line 596, in launch_instance
    app.start()
  File "/tmp/foo/lib/python3.5/site-packages/IPython/terminal/ipapp.py", line 348, in start
    self.shell.mainloop()
  File "/tmp/foo/lib/python3.5/site-packages/IPython/terminal/ptshell.py", line 398, in mainloop
    self.interact()
  File "/tmp/foo/lib/python3.5/site-packages/IPython/terminal/ptshell.py", line 381, in interact
    code = self.prompt_for_code()
  File "/tmp/foo/lib/python3.5/site-packages/IPython/terminal/ptshell.py", line 324, in prompt_for_code
    pre_run=self.pre_prompt, reset_current_buffer=True)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/interface.py", line 387, in run
    self.eventloop.run(self.input, self.create_eventloop_callbacks())
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/eventloop/posix.py", line 154, in run
    t()
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/eventloop/posix.py", line 82, in read_from_stdin
    inputstream.feed(data)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/terminal/vt100_input.py", line 376, in feed
    self._input_parser.send(c)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/terminal/vt100_input.py", line 295, in _input_parser_generator
    self._call_handler(match, prefix)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/terminal/vt100_input.py", line 328, in _call_handler
    self.feed_key_callback(KeyPress(key, insert_text))
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/interface.py", line 916, in feed_key
    self._active_cli.input_processor.feed_key(key_press)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/key_binding/input_processor.py", line 174, in feed_key
    self._process_coroutine.send(key_press)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/key_binding/input_processor.py", line 146, in _process
    self._call_handler(matches[-1], key_sequence=buffer)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/key_binding/input_processor.py", line 190, in _call_handler
    handler.call(event)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/key_binding/registry.py", line 32, in call
    return self.handler(event)
  File "/tmp/foo/lib/python3.5/site-packages/IPython/terminal/ptshell.py", line 187, in _
    b.apply_completion(cs.current_completion)
  File "/tmp/foo/lib/python3.5/site-packages/prompt_toolkit/buffer.py", line 762, in apply_completion
    assert isinstance(completion, Completion)
AssertionError

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True
@Carreau
Copy link
Member

Carreau commented Jun 9, 2016

duplicate of #9578 , I'll release a beta3 that have the fix in a few minutes.

@Carreau Carreau closed this as completed Jun 9, 2016
@ericdill
Copy link
Author

ericdill commented Jun 9, 2016

Ugh, sorry for wasting your time! I dont know how I missed #9578

@Carreau
Copy link
Member

Carreau commented Jun 9, 2016

Ugh, sorry for wasting your time! I dont know how I missed #9578

No problem. You can update, I released the beta3 now, need to announce it.

@minrk minrk added this to the no action milestone Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants