question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IPython crashes on tab completion: async handler deleted by the wrong thread

See original GitHub issue

IPython 6.2.1 in --pylab mode crashes intermittently but frequently when trying to tab complete after displaying some figures. I apologize I don’t have a test case, as it’s not repeatable.

Exception ignored in: <bound method Image.__del__ of <tkinter.PhotoImage object at 0x7fbc20e70160>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/tkinter/__init__.py", line 3504, in __del__
In [81]: sns.pairTcl_AsyncDelete: async handler deleted by the wrong thread
Aborted (core dumped)
Exception ignored in: <bound method Image.__del__ of <tkinter.PhotoImage object at 0x7fc68815f828>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/tkinter/__init__.py", line 3504, in __del__
    self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
Exception ignored in: <bound method Image.__del__ of <tkinter.PhotoImage object at 0x7fc670d513c8>>
Traceback (most recent call last):
  File "/usr/lib/python3.6/tkinter/__init__.py", line 3504, in __del__
    self.tk.call('image', 'delete', self.name)
RuntimeError: main thread is not in main loop
In [7]: fig.add_Tcl_AsyncDelete: async handler deleted by the wrong thread
Aborted (core dumped)
$ uname -a
Linux xxx 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
$ python -V
Python 3.6.3
$ ipython -V
6.2.1

Maybe related to #10819?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:10
  • Comments:18 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nateGeorgecommented, Aug 25, 2018

Actually, I’m still having some problems when doing a matplotlib plot and sklearn random forests. I have a plot that gets generated, then a bunch of random forests are fit, and it sometimes randomly quits out with the same ‘async handler’ error.

0reactions
dashesycommented, May 1, 2019

Tab completion hangs even without pylab

Python 3.6.8 IPython 7.5.0

CPU is stuck at 100%

Read more comments on GitHub >

github_iconTop Results From Across the Web

IPython crashes on tab completion - Stack Overflow
1 Answer 1 ... Updating IPython (problematic version 6.2.1 , currently using 7.19.0 ) fixed it for me and I haven't had the...
Read more >
Issue 31725: Turtle/tkinter: NameError crashes ipython with ...
Title: Turtle/tkinter: NameError crashes ipython with "Tcl_AsyncDelete: async handler deleted by the wrong thread".
Read more >
Issues closed in the 0.13 development cycle — IPython 7.3.0.dev ...
This documentation covers a development version of IPython. ... a Job in the TaskScheduler; PR #1447: 1107 - Tab autocompletion can suggest invalid...
Read more >
Xonsh Change Log - xonsh 0.13.2 documentation
Fixed a bash completion bug when completing a git branch name when deleting a remote ... Crashing command-not-found output for bad file names...
Read more >
IPython Documentation
Background execution of Python commands in a separate thread. ... 140: malloc error during tab completion of numpy array member functions ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found