Vlas Sokolov
Vlas Sokolov

Reputation: 3893

IPython crashes on tab completion

I've encountered an annoying issue causing ipython to crash on tab completion. Occurs frequently and persistently, yet without any clear indication what causes it. Has anyone else encountered this? If so, is there a workaround? I'm running IPython 6.2.1 on Python 3.6.4.

Here's the error message just before the crash, right after a tab button is pressed on a class attribute >In [35]: class_instance.attri<tab>:

Exception ignored in: <bound method Image.__del__ of <tkinter.PhotoImage object at 0x7f5e4832e470>>
Traceback (most recent call last):
  File "/home/foobar/.pyenv/versions/3.6.4/lib/python3.6/tkinter/__init__.py", line 3501, in __del__
    self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
In [15]: class_instance.specfiTcl_AsyncDelete: async handler deleted by the wrong thread
[1]    23894 abort (core dumped)  ipython

Apologies for not being able to reliably reproduce this one - as I said earlier, it seems to occur semi-randomly at tab completion. That being said, importing matplotlib and/or running in --pylab mode might be relevant.

Upvotes: 4

Views: 1520

Answers (1)

Vlas Sokolov
Vlas Sokolov

Reputation: 3893

Updating IPython (problematic version 6.2.1, currently using 7.19.0) fixed it for me and I haven't had the issue re-appear even since (2018+).

I'm posting an answer describing what solved it for me because the question seems to generate some traffic to this day.

Upvotes: 1

Related Questions