Skip to content

Autocomplete of directory sometimes throws an exception and then semi-crashing #10585

Open

Description

@themuniz

Since upgrading to ipython 6, when I autocomplete for filenames in a directory I will sometimes (about once every 5 times) get an exception (see below) and ipython will semi-crash (the autocomplete and syntax highlighting stop working). While similar to other reported issues, this happens with and without spaces, and only occurs occasionally.

Exiting and restarting ipython fixes the issue.

--System information--

{'commit_hash': '51ce9d73b',
'commit_source': 'installation',
'default_encoding': 'UTF-8',
'ipython_path': '/Users/jmuniz/anaconda/lib/python3.5/site-packages/IPython',
'ipython_version': '6.0.0',
'os_name': 'posix',
'platform': 'Darwin-16.6.0-x86_64-i386-64bit',
'sys_executable': '/Users/jmuniz/anaconda/bin/python',
'sys_platform': 'darwin',
'sys_version': '3.5.2 |Anaconda custom (x86_64)| (default, Jul 2 2016, '
'17:52:12) \n'
'[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)]'}

--Traceback--

Exception in thread Thread-27
Traceback (most recent call last):
File "/Users/jmuniz/anaconda/lib/python3.5/threading.py", line 914, in _bootst
self.run()
File "/Users/jmuniz/anaconda/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/Users/jmuniz/anaconda/lib/python3.5/site-packages/prompt_toolkit/interf
completions = list(buffer.completer.get_completions(document, complete_event
File "/Users/jmuniz/anaconda/lib/python3.5/site-packages/IPython/terminal/ptut
yield from self._get_completions(body, offset, cursor_position, self.ipy_com
File "/Users/jmuniz/anaconda/lib/python3.5/site-packages/IPython/terminal/ptut
yield Completion(c.text, start_position=c.start - offset, display=_elide(dis
File "/Users/jmuniz/anaconda/lib/python3.5/site-packages/IPython/terminal/ptut
return '{}.{}\N{HORIZONTAL ELLIPSIS}{}.{}'.format(parts[0], parts[1][0], par
IndexError: string index out of range

Activity

  1. Carreau commented on May 23, 2017

    @Carreau
    Member

    Oh, I think I fixed this in #10508 would you mind trying master ?

  2. added this to the 6.1 milestone on May 24, 2017
  3. Carreau commented on May 29, 2017

    @Carreau
    Member

    I'm going t assume #10508 dis actually fix all the things. and close that. Feel free to reopen.

  4. themuniz commented on Jun 21, 2017

    @themuniz
    Author

    Sorry for the delay in getting back to you on this, my package manager was a pain.

    I'm on 6.1 now, and while the issue happens less frequently, it still occurs. I get the same crash but I also now get the following message before the trackback:

    2017-06-21 01:30:28.906 Python[24862:11127349] !!! BUG: The current event queue and the main event queue are not the same. Events will not be handl
    el

    Please consider re-opening.

  5. Carreau commented on Jun 22, 2017

    @Carreau
    Member

    Sorry for the delay in getting back to you on this, my package manager was a pain.

    I'm on 6.1 now, and while the issue happens less frequently, it still occurs. I get the same crash but I also now get the following message before the trackback:

    2017-06-21 01:30:28.906 Python[24862:11127349] !!! BUG: The current event queue and the main event queue are not the same. Events will not be handl
    el

    Are you using open CV ? Because this seem like an openCV thing which is a different bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions